Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VA01 Multiple line items error

former_member620069
Participant
0 Likes
1,071

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.


1 ACCEPTED SOLUTION
Read only

archanapawar
Contributor
0 Likes
924

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.

5 REPLIES 5
Read only

archanapawar
Contributor
0 Likes
925

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.

Read only

0 Likes
924

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.

Read only

0 Likes
924

Hi,

Pass the 1 value at the place of Zeor (0).

And then try.

regards.

Praveer,

Read only

0 Likes
924

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.

Read only

0 Likes
924

Hi,

I used '/00' instead of 'P++'.

Problem solved.

Thanks .