QR codes for Portual in SAP ABAP
Below code will give QR code for the given delivery Docuemnt, before using this code SIPT_LIKP table should have entries for the delivery document.
once Delviery got PGI'ed then only SIPT tables will have entries.
---------------------------------------------------------------------------------------------------------------------------
DATA: ls_qr TYPE sipt_s_invqrcode,
lv_obj TYPE REF TO cl_qrcode_pt_obd_utill,
ls_qrc_get_param TYPE cl_rdsv_qrcode=>qrcode_get_param,
ls_qrc_additional_param TYPE cl_sipt_qrcode_pt=>additional_param,
ls_qrc_object_pt TYPE cl_qrcode_pt_obd_utill=>ty_obd_pt_s.
PARAMETERS p_vbeln TYPE vbeln_vl DEFAULT '0083252768'.
*delivery_no = p_vbeln.
CREATE OBJECT lv_obj.
CALL METHOD lv_obj->get_qrcode_obd_data
EXPORTING
iv_delivery = p_vbeln
IMPORTING
qrcode_obd_data = ls_qrc_object_pt.
IF ls_qrc_object_pt-header-customer_vatreg IS INITIAL.
ls_qrc_object_pt-header-customer_vatreg = '999999990'.
ENDIF.
ls_qrc_get_param-intca = 'PT'.
ls_qrc_get_param-source_type = 'OUTBOUND_DELIVERY'.
TRY.
BREAK-POINT.
cl_rdsv_qrcode=>get_qrcode(
EXPORTING get_param = ls_qrc_get_param
source_object = ls_qrc_object_pt
additional_param = ls_qrc_additional_param
IMPORTING qrcode = DATA(qr_result) ).
CATCH cx_rdsv_qrcode INTO DATA(exc_qrc).
MESSAGE ID exc_qrc->if_t100_message~t100key-msgid
TYPE 'E'
NUMBER exc_qrc->if_t100_message~t100key-msgno
WITH exc_qrc->if_t100_message~t100key-attr1.
ENDTRY.
*ls_qr-qrstring = condense( qr_result-qrstring ).
ls_qr-qrstring = qr_result-qrstring.