2019 Sep 10 3:05 PM
how to avoid the double entry of a material in a internal table of a valuated class stock in a loop.because we are used loop inside loop.i am getting the same material value twice.pls give suggestion to avoid twice value.
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem"
2019 Sep 10 3:16 PM
Hello Sandhya,
Could you show the code or provide a littel more of context?
Best regards.
2019 Sep 10 4:01 PM
Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem"
2019 Sep 10 3:22 PM
can you provide the code ?
Anyways, did you try to filter records with where clause/parallel cursor ? or a simply read statement instead of inner loop, if you want to access only 1 record. ?
Without code and giving exact details it will be difficult for everyone to help you.
Thanks
Rameez
2019 Sep 11 4:43 AM
loop at it_mbew into wa_mbew.
LOOP at it_mard INTO wa_mard WHERE matnr = wa_mbew_new-matnr AND werks = wa_mbew_new-bwkey ."AND labst = wa_mbew_NEW-lbkum."AND charg = wa_mbew-bwtar.
wa_mbew1-bwkey = wa_mbew_new-bwkey.
wa_mbew1-matnr = wa_mbew_new-matnr.
wa_mbew1-bwtar = wa_mbew_new-charg.
wa_mbew1-lbkum = wa_mard-labst + wa_mard-insme.
wa_mbew1-verpr = wa_mbew_new-verpr.
wa_mbew1-bklas = wa_mbew_new-bklas.
** wa_mbew1-STPRS = wa_mbew_new-STPRS.
** wa_mbew1-lgort = wa_mchb-lgort.
IF wa_mbew1-bklas = '8100'.
wa_mbew1-salk3 = wa_mbew1-lbkum * wa_mbew_new-STPRS.
ELSE.
wa_mbew1-salk3 = wa_mbew_new-salk3."wa_mbew1-lbkum * wa_mbew_new-verpr.
ENDIF.
* if wa_mbew_new-matnr = wa_mard-matnr.
* APPEND wa_mbew1 to it_mbew1.
* ELSE.
* exit.
* endif.
if wa_mbew1-lbkum IS NOT INITIAL.
APPEND wa_mbew1 to it_mbew1.
ENDIF.
CLEAR wa_mbew1.
ENDLOOP.
SORT it_mbew1 by bwkey matnr bwtar DESCENDING.
ENDLOOP.
2019 Sep 11 4:45 AM
In this code I am getting two values for a mterial .pls give me some suggestion.
2019 Sep 11 10:15 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |