data ls_varid type varid.
data ls_varit type varit.
data lt_varit type standard table of varit with empty key.
ls_varid-mandt = sy-mandt. " Mandant
ls_varid-report = lv_client_report.
ls_varid-variant = lv_variant.
ls_varid-flag1 = ''.
ls_varid-flag2 = ''.
ls_varid-transport = ''.
ls_varid-environmnt = 'B'. " Batch
ls_varid-protected = ''.
ls_varid-secu = ''. " Berechtigungsgruppe
ls_varid-version = ''. " Versionsnummer der Variante
ls_varid-ename = sy-uname.
ls_varid-edat = sy-datum. "
ls_varid-etime = sy-uzeit. "
ls_varid-aename = sy-uname.
ls_varid-aedat = sy-datum.
ls_varid-aetime = sy-uzeit.
ls_varid-mlangu = sy-langu.
ls_varid-xflag1 = ''.
ls_varid-xflag2 = ''.
ls_varit-mandt = sy-mandt.
ls_varit-langu = sy-langu.
ls_varit-report = lv_client_report.
ls_varit-variant = lv_variant.
ls_varit-vtext = |My Variant { sy-datum date = iso } | ??
|{ sy-uzeit time = iso }|.
insert ls_varit into table lt_varit.
call function 'RS_CREATE_VARIANT'
exporting
curr_report = lv_client_report
curr_variant = lv_variant
vari_desc = ls_varid
tables
vari_contents = lt_rsparam
vari_text = lt_varit
exceptions
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
others = 9.
if sy-subrc = 0.
commit work.
else.
" s...
endif.
Subscribe to:
Post Comments (Atom)
SAP ABAP: Determine Timezone for Plant
DATA: lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY, l_tzone TYPE tznzone. " get time zone for plant ...
-
Sometimes the backend doesn't return the selected rows of an SALV. For my case get_metadata( ) was the solution: go_salv-> get_met...
-
GUIDs or UUIDs can be created with the class cl_system_uuid . try . data (lv_uuid) = cl_system_uuid => if_system_uuid_static...
-
AA PR-AUF(E) Prozessauftrag (eröffnet) AB PR-AUF(F) Prozessauftrag (freigegeben) AC FE...
No comments:
Post a Comment