Next we have to make the output on a smartform and it's very simple. Just take the BAPI and use it inside the smartform and to avoid that file names collide, use the 'GUID_CREATE' function module to generate different names. This function module has 3 importing parameters which outputs 3 kind of GUIDs. In my case I used the 'EV_GUID_16' one. The base on this strategy is that there will be no chance to have the same file name per request.
data: lv_text type char255, " Variable for text to convert in QR code lv_check type c, " Flag to check if QR code was generated lv_name type char20. " Variable for file name data lv_guid type guid_16. " Variable for GUID call function 'GUID_CREATE' importing ev_guid_16 = lv_guid. move lv_guid to lv_name. lv_text = 'Demo for QR code'. call function 'ZQRCODE' exporting i_text = lv_text " Text to convert i_name = lv_name " Graphic name importing e_check = lv_check. " 'X' = success in conversion if lv_check is not initial. g_name = lv_name. display = 'X'. " Yes, display the image endif.
Serkan AKKAVAK Computer Engineer ABAP Developer & SAP S/4 HANA Logistics Team Lead Contact : serkurumsal@yandex.com
Social Plugin