SAP ABAP - Call Transaction Code KSS2 From Custom Program
DATA:
lt_mara TYPE TABLE OF mara,
ls_mara TYPE mara.
DATA : xmarked TYPE char1.
PARAMETERS:
p_bukrs TYPE bukrs.
PARAMETERS:
p_rb1 RADIOBUTTON GROUP rb DEFAULT 'X',
p_rb2 RADIOBUTTON GROUP rb,
p_rb3 RADIOBUTTON GROUP rb,
p_rb4 RADIOBUTTON GROUP rb.
START-OF-SELECTION.
CASE abap_true.
WHEN p_rb1. xmarked = 'I'.
WHEN p_rb2. xmarked = 'S'.
WHEN p_rb3. xmarked = 'V'.
WHEN p_rb4. xmarked = 'A'.
ENDCASE.
SET PARAMETER ID 'CAC' FIELD '1000'.
SET PARAMETER ID 'VPE' FIELD '001'.
SET PARAMETER ID 'GJR' FIELD sy-datum(4).
SET PARAMETER ID 'K70' FIELD xmarked. "I = Cost Center, S = Cost Center Group, V = Variant, A = All Cost Center
CALL TRANSACTION 'KSS2'.
lt_mara TYPE TABLE OF mara,
ls_mara TYPE mara.
DATA : xmarked TYPE char1.
PARAMETERS:
p_bukrs TYPE bukrs.
PARAMETERS:
p_rb1 RADIOBUTTON GROUP rb DEFAULT 'X',
p_rb2 RADIOBUTTON GROUP rb,
p_rb3 RADIOBUTTON GROUP rb,
p_rb4 RADIOBUTTON GROUP rb.
START-OF-SELECTION.
CASE abap_true.
WHEN p_rb1. xmarked = 'I'.
WHEN p_rb2. xmarked = 'S'.
WHEN p_rb3. xmarked = 'V'.
WHEN p_rb4. xmarked = 'A'.
ENDCASE.
SET PARAMETER ID 'CAC' FIELD '1000'.
SET PARAMETER ID 'VPE' FIELD '001'.
SET PARAMETER ID 'GJR' FIELD sy-datum(4).
SET PARAMETER ID 'K70' FIELD xmarked. "I = Cost Center, S = Cost Center Group, V = Variant, A = All Cost Center
CALL TRANSACTION 'KSS2'.
Comments
Post a Comment