Category Archives: мнение, опит

Споделени мнения и опит

Extend VL06 transaction adding new field in output layout – SAP ECC

A good article and OSS note if you need to extend the standard ABAP SAP ECC transaction VL06 to display outbound deliveries details.

VL06: Insert fields to LIPOV


OSS Note 128150:


Extend LIPOVZ structure with your append structure and fields.

LIPOVZ is included in LIPOV structure which is used in report VL06.

If the name of the new fields are the same as in LIKP / LIPS, then the values will be auto populated.

But if you want to get values from other fields (like SO VBAK, or VBKD table), then you have to implement user-exit (extension name) via transaction SMOD assigning: V50Q0001

And in function module EXIT_SAPLV50Q_001 you have to create include ZXV50QU01 in which to put your code. Loop at CT_POSTAB and determine the value and change the field in the item of this internal table. Note: this exit is called for all items at once!

Sometimes you need to reset the buffers:
Note : BALVBUFDEL program must be run with SE38 for deletion of last buffer . Details on oss note 122975.

Fix VirtualBox (copy/move/restore) VM

If you have moved a VM or have an old copy of working VM, you can land in situation where the VirtualBox software is reinstalled or moved and you get errors when you restore old VMs or move some.

Could not find an open hard disk with UUID {2219b9d1-8931-418c-a7d5-d5ce00c81b7c}.
Result Code:


Virtual Box UUID {17c3.........} does not match the value {3c1b...} 
stored in the media registry ('/home/user/.VirtualBox/VirtualBox.xml')
Machine UUID {899a89219ax-7d55-8381-01ac-288288101} doesn't match its UUID {0388cb75-f076-4992-ab96-ed8d2ff99623} in the registry file
Result code: NS_ERROR_FAILURE (0x80004005}

The solution I found is based on the answers here: and my experience.

First – check if you have running the VirtualBox with the right user! Sometimes errors can occur if you have installed the VirtualBox with different user and the current one is not admin or does not have enough rights!!!

Second – fix the UUID like below.

Copy existing VM (duplicate) via VirtualBox to create a new folder and working VM.

Rename the VirtualBox.vdi file to VirtualBox0.vdi of the new VM.

Get the UUID of the working VM with the following command:

The result should look like:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands dumphdinfo VirtualBox0.vdi
--- Dumping VD Disk, Images=1
Dumping VD image "polikont_feb2016-disk1.vdi" (Backend=VDI)
Dumping VDI image "polikont_feb2016-disk1.vdi" mode=r/o uOpenFlags=9 File=0x0002586d731290
Header: Version=00010001 Type=1 Flags=0 Size=85888373760
Header: cbBlock=1048576 cbBlockExtra=0 cBlocks=81910 cBlocksAllocated=13687
Header: offBlocks=512 offData=328192
Header: Geometry: C/H/S=1024/255/63 cbSector=512
Header: uuidCreation={0388cb75-f076-4992-ab96-ed8d2ff99623}
Header: uuidModification={24bde4bc-e7cf-4d60-8f40-a257b3460228}

Set UUID to the restored/copied VM which was giving error (I have renamed it to VirtualBox.vdi in the directory of the working copy, after I have renamed the working VDI to VirtualBox0.vdi and taken its UUID as shown above). So set its UUID as follow:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands sethduuid  VirtualBox.vdi 0388cb75-f076-4992-ab96-ed8d2ff99623

Replace the UUID (0388cb75-f076-4992-ab96-ed8d2ff99623) with your result from dumphdinfo command!

*** This was experienced and tested in VirtualBox 7.0 under Windows 10 at May 2024.

S/4HANA material segmentation, Country of Origin (CoO) in MIGO

SAP ERP doesn’t directly capture the country of origin during a MIGO goods receipt for a newly created batch. However, you can achieve this through implementing a User Exit.

Additional batch data, such as the country of origin, region of origin, and freely available date fields, can be changed only in user exits. To create a new batch for the goods movement, use the exit EXIT_SAPMM07M_003.

MCHA-HERKL is not automatically updated based on the purchase order during a goods receipt. You must use user exit EXIT_SAPMM07M_003

The user-exit EXIT_SAPMM07M_003 is in
Enhancement: “MBCFC003” – Maintenance of batch master data for goods movements”
(Use transaction: CMOD to activate the exit and assign enhancement).

Question: Why is the user exit EXIT_SAPMM07M_003 processed for some batches but not for others?

Answer: The user exit EXIT_SAPMM07M_003 is processed only if the batch is newly created by the goods movement. This may have different consequences depending on the batch definition level.

To determine the country of origin (CoO) you can use proper setup of segmentation field. Documentation here:

SAP docs on segmentation functionality:

Segmentation (LO_SEGMENTATION) is a new SAP ERP component, integrated into:

  • LO Material Master
  • SD Sales
  • MM Purchasing

SGT_CATS – ABAP table: Segmentation Structure Fields Table

SGT_CSEGSCON – ABAP table with segmentation rules defined

SGT_VALS – ABAP table with Segmentation-Valid Combinations

Continue reading S/4HANA material segmentation, Country of Origin (CoO) in MIGO

Инвестиции в акции – опит, идеи, полезни страници

Добра идея и предложение:

Как искам да се променят законите за ДДС за да се премахне парадокса “ДДС за инвеститори” или когато

Защото “облагаем” оборот за регистрация не значи оборот, който се облага с ДДС. “Облагаемият” оборот за регистрация не се облага с ДДС, но го наричат облагаем, защото така са си го дефинирали в закона.

Това е подигравка.

Това е все едно да наричат котките кучета и да карат хората да попълват декларация за притежание на куче, въпреки че притежават котка.

По принцип много полезен и редовно актуализиран блог е този на Валентин Стойков:


Google Drive API v3 (googleapiclient.errors.HttpError 404 File not found)

If you try to upload a file in a shared drive (in Google Drive) you may get the above error.

This is my experience and solution as of February 2024 using Python 3.10.

from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload
from google.oauth2 import service_account

from io import BytesIO
from googleapiclient.http import MediaIoBaseUpload
from import translate_v2 as translate

## Credentials of service account
credentials = service_account.Credentials.from_service_account_info(service_account_info, scopes=[''])

## API Client Service
service = build("drive", "v3", credentials=credentials)

# buffer_memory=BytesIO(b"some initial binary data: \x00\x01") # BytesIO() new_body
buffer_memory=BytesIO() # BytesIO() new_body

## Prepare the file in memory (you can upload local file too with MediaBase Upload)
media_body = MediaIoBaseUpload(buffer_memory, mimetype='text/html', 
        chunksize=1024*1024, resumable=False)
                body = {
                        'title': file_name,
                        "name": file_name,
                        "mimeType": "application/",
                        "driveId": "0APee............PVA",
                        "parents": ['0APe.............PVA'],

## Upload file
returned_fields="id, name, mimeType, size, webViewLink, exportLinks"
upload_response=service.files().create( body=body,                                                            

## Share the created file with user
user_permission = {
                    "type": "user",
                    "role": "writer",
                    "emailAddress": share_user,
                perm_response = service.permissions().create(

The important difference between uploading in private Google drive is that you have to use the following parameters for Shared Drives:

driveId -> Id of Shared Drive
parents -> Folder or Shared Drive

Mime Types: List of the supported Mime type here


If you want to convert the uploaded file to Google Drive native format use the following parameter:

"mimeType": "application/",

Google documentation:

And this article on StackOverflow as well helped to find the solution although some parameters are wrong or deprecated already:

Python snippets 2024 Q1

How to convert StringIO object to BytesIO object vice versa.

I want to read a string with the io.StringIO and then convert it to an io.BytesIO object and vice versa, how can I do this?

Below is the example source code which can implement python StringIO and BytesIO object converts.

import io
# Convert a StringIO object to BytesIO object.
def stringio_to_bytesio(str):
    str_io_object = io.StringIO(str)
    str_data ='utf8')
    bytes_io_object = io.BytesIO(str_data)
# Use io.TextIOWrapper to convert BytesIO object to a string. Then we can build a StringIO object on the string.     
def bytesio_to_stringio(bytes_str):
    data = io.BytesIO(bytes_str)
    # Create an instance of io.TextIOWrapper class.
    text_wrapper = io.TextIOWrapper(data, encoding='utf-8')
    str =
    str_io_object = io.StringIO(str)
if __name__ == '__main__':
    bytes_str = stringio_to_bytesio('I love python')
    bytesio_to_stringio(b'hello python')

Source (with more details):

Constrictor hitch (knot) – Констриктор възел

Very good video showing how to tie a constrictor knot (hitch).
Много добро видео с обяснение как се връзва възел “констриктор”:

And wikipedia article for reading:

Renault Laguna III 2.0 dci – Service intervals / Интервали на смяна за Рено Лагуна 3 дизел

As there is no official info in the User’s manual of Laguna 3, I found out this recently useful site:

I was interested what is the recommended interval (if any) for the timing chain of this model. So the answer is:

Timing chain

There is no manufacturer specified replacement interval for the engine timing chain on Renault Laguna 2013 2.0 diesel (expecting it to last until the engine is overhauled – nice!).

Based on real life experience, the Renault Laguna 2013 2.0 dCi timing chain change interval is approximately 200,000 km as at this mileage it may become overstretched and require replacement, so it is recommended to check the condition of the chain periodically after this mileage is reached and replace the timing chain if it becomes excessively stretched or if unusual engine noises occur.

Serpentine (drive) belt

Renault Laguna 2013 2.0 dCi serpentine or alternator belt replacement interval is 120,000 km.

Engine coolant

Engine coolant (antifreeze) recommended replacement interval for Renault Laguna 2.0 diesel is 90,000 km or 5 years, whichever comes first.

И на български – понеже няма в книжката на колата по-важните интервали за обслужване при последното търсене намерих полезна информация на този сайт (на английски) за моделът дизел 2.0 на Рено Лагуна 3 –

Та тук хората казват, че няма препоръчителен период и километри през които да се сменя веригата (ангренажна) на този двигател. Препоръчват от опит на 200хил.км. и по-скоро след тези километри да се проверява. Няма години и срок даден!

Други регулярни, но по-редки (от смяна на масла и филтри) смени споменати:

  • ремък на алтернатора на 120хил.км
  • антифриз – на 90хил.км или 5 години, което настъпи първо

А дали не се ползват БНБ, НСИ и други институции за проучвания на цели в превзетата ни държава?

Последните 7 минути, таен запис на Яне Янев за Бойко и схемата за завземане и управление на фирми и т.н. от Б.Б. и компания в превзетата ни държава – т.нар. “Списък за бърз контрол”.

Та да внимавате като стигнете над 10млн. лв оборот… и като се замисля в една фирма така ни почнаха НАП и статистика на “случаен” принцип нейде след една две силни години да ни следят постоянно – я плащания от БНБ, я трудова статистика от НСИ, я пак нещо друго от БНБ, хайде пак НСИ, я проверка от НАП… Та така “Списък за бърз контрол“…

Това се замислих тези дни като гледах видеота на Антикорупционния фонд за осемте джуджета и преди това за видеото с размисли за убийството на Мартин Божанов-Нотариуса и там откъсите от разследванията на Антикорупционния фонд.

Всичко за убийството на Мартин Божанов – Нотариуса

iOS and iPhone ring tone from video or audio file

In two easy steps you can convert any video or audio file to iOS ringtone.

  1. You need to convert the desired tone/music into M4R format first.
    For this you I use:
    The nice option is that you can set start and end time (trim) the output file!
  2. If you are with MacOS, you can use Music app to upload the M4R ringtone using your iPhone cable.
    It is shown in this short video how to upload ringtone to iOS via Music app on Mac:

Как да си направите рингтон за iOS от видео или аудио файл в две лесни стъпки.

  1. Трябва да конвертирате желаната музика или звук в M4R формат първо.
    Аз използвам този сайт, който предлага и задаване да се отреже само част от музиката:
  2. Ако сте с MacOS можете лесно с кабела на iPhone-а да си качите рингтона като използвате приложението Music:
    В това кратко видео е показано как се качва рингтон (мелодия за звънене) на iPhone чрез приложението Music на MacOS: