2014 Dec 16 6:03 AM
Dear Experts,
I have developed a BDC program for VA01 , In multiple line items it showing RV45A-MABNR(05) not exit on the screen.
I changed screen resolution set as DEFSIZE = 'X',Still getting same error.
My Code:
LOOP AT RECORD1 WHERE KUNAG = LS_FINAL1-KUNAG.
CONCATENATE 'RV45A-MABNR( ' IDX ' ) ' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
RECORD1-MABNR.
CONCATENATE 'RV45A-KWMENG( ' IDX ' ) ' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
RECORD1-KWMENG.
IDX = IDX + 1.
ENDLOOP.
CALL TRANSACTION 'VA01' USING BDCDATA OPTIONS FROM LS_OPT.
HERE LS_OPT contains:
LS_OPT-DISMODE = 'E'.
LS_OPT-DEFSIZE = 'X'.
LS_OPT-UPDMODE = 'S'.
Regards,
Srini.
2014 Dec 16 7:02 AM
Hi Srinivas,
First of all, run your BDC in foreground and see how many lined are available to you in table control. This error comes only when program is unable to find line you are trying to edit.
In table controls, after each set of visible lines, you need to write a code for page down
OK_code = 'P++'.
And you need to reset your index to 1. in your case its IDX.
Please note that after page down, table control retains last line of previous page, so your index should start with 2.
I hope you understand what I am trying to say. Let me know if you need further help.
2014 Dec 16 7:02 AM
Hi Srinivas,
First of all, run your BDC in foreground and see how many lined are available to you in table control. This error comes only when program is unable to find line you are trying to edit.
In table controls, after each set of visible lines, you need to write a code for page down
OK_code = 'P++'.
And you need to reset your index to 1. in your case its IDX.
Please note that after page down, table control retains last line of previous page, so your index should start with 2.
I hope you understand what I am trying to say. Let me know if you need further help.
2014 Dec 16 7:24 AM
Hi Archana,
I Given Like this.Problem persistence.
IDX = IDX + 1.
CONCATENATE 'RV45A-MABNR( ' IDX ' ) ' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
RECORD1-MABNR.
CONCATENATE 'RV45A-KWMENG( ' IDX ' ) ' INTO FNAM.
PERFORM BDC_FIELD USING FNAM
RECORD1-KWMENG.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=P++'.
IF IDX GE 3.
IDX = 0.
ENDIF.
2014 Dec 16 7:27 AM
Hi,
Pass the 1 value at the place of Zeor (0).
And then try.
regards.
Praveer,
2014 Dec 16 7:36 AM
Hi Srinivas,
You need to check how many lines are visible at a time. Based on that you need to pass ok_code as 'P++'. If you will pass it every time it will not work.
*- If number of editable records on the screen are 5, then you should put page down ok code on 5th record. Refer below code.
if IDX = 5.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=P++'.
IIDX = IDX + 1.
ENDIF.
2014 Dec 16 7:39 AM