hi all,
i need to fetch the data based on BELNR BUKRS and ZUONR
The data is
BELNR BUKRS ZUONR DMBTR
1001 0005 TP004 5
1001 0005 TP006 4
1001 0005 PK458 10
1001 0005 PK876 2
1001 0005 PK999 50
The output should be as
BELNR BUKRS ZUONR DMBTR
1001 0005 TP006 9
1001 0005 PK999 62
If ZUONR field first 2 alphabets are same those DMBTR values should be added and ZUONR output should be last value of the first 2 alphabets
suppose for above eg:
ZUONR = TP004 = 5
TP006 = 4
-
9
-
ZUONR Should display the highest of first 2 alphabtes i.e., coming to TP, the highest is TP006
THE output should be as
BELNR BUKRS ZUONR DMBTR
1001 0005 TP006 9
please see code below
i have added the all DMBTR values ,if FIRST 2 alphabets of ZUONR ARE SAME but how to pass zuonr highest value to output.
now the output is coming as
BELNR BUKRS ZUONR DMBTR
1001 0005 TP-----(missing 006) 9
only 2 fields of ZUONR is displaying, while adding DMBTR it should compare with first 2 alphabets of ZUONR But while displaying in the output the Zuonr should be highest value of the first 2 alphabets,
LOOP AT gt_bseg.
gt_output-belnr = gt_bseg-belnr.
gt_output-zuonr+0(2) = gt_bseg-zuonr.
gt_output-dmbtr = gt_bseg-dmbtr.
gt_output-wrbtr = gt_bseg-wrbtr.
COLLECT gt_output.
CLEAR gt_output.
ENDLOOP.
please help