Application Development 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: 

Call transaction message

former_member512041
Participant
0 Kudos

Hello All,

I am trying to upload the data from text file to KP06 t-code using CALL transaction.

The following is the statement:

call transaction 'KP06' using bdcdata mode 'E' messages into imsgtab.

It is displaying the ok_code screen with value =CBUC and displaying the actual screen 0110. and then displaying the following message in the down message bar.

Field BDC03 (12) does not exist in the screen SAPLKPP2 0110.

To me the field BDC03 (12) is there in the screen. I can see it when the screen is displayed along with the ok_code screen.

Can someone give me some idea how to fix this problem?

Thanks for the great help.

Sobhan.

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

(12) means the 12th line of the table? If so, you should use the DEFSIZE parameter to give you a consistant size and you will need to handle the page up/down. That message is telling you that the field in question is not currently on the screen.




data: bdcdata type table of bdcdata with header line.
data: imsgtab type table of bdcmsgcoll with header line.

data: opt type ctu_params.

opt-DISMODE = 'E'.
opt-defsize = 'X'.


call transaction 'KP06' using bdcdata
                        options from opt
                        messages into imsgtab.

Regards,

Rich Heilman

22 REPLIES 22

Former Member
0 Kudos

Did you have to scroll down to see the line?

Rob

0 Kudos

Rob,

Thanks for the response. Yes, it has scroll down bar and I can scroll down.

Thanks,

Sobhan.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

(12) means the 12th line of the table? If so, you should use the DEFSIZE parameter to give you a consistant size and you will need to handle the page up/down. That message is telling you that the field in question is not currently on the screen.




data: bdcdata type table of bdcdata with header line.
data: imsgtab type table of bdcmsgcoll with header line.

data: opt type ctu_params.

opt-DISMODE = 'E'.
opt-defsize = 'X'.


call transaction 'KP06' using bdcdata
                        options from opt
                        messages into imsgtab.

Regards,

Rich Heilman

0 Kudos

I find it easier to handle this sort of situation with the "Position..." button (ok code CPOZ). If you have entered 12 lines, press this button (in batch input) and line 13 will come to the top or be the second line.

This is available for this transaction, but unfortunately not for all transactions.

Rob

0 Kudos

I agree, the position button has saved me a lot. If there is one for this transaction, do your recording again, this time use the position to button to make the certain row the first row of the table control, then you will can do the BDC logic in a LOOP and always be modifing the first row.

Regards,

Rich Heilman

0 Kudos

Rich,

I tried your solution. It did not work. There are only 13 rows in the screen. For the 12 rows the data is filled from the input text file. The 13th row contains the total of all 12 rows. The error message is coming on 12th row.

Thanks,

Sobhan.

0 Kudos

Are you sure it's not Z-BDC03 (12) instead of BDC03 (12)?

Rob

0 Kudos

Rob,

Yes, I am sure it is BDC03(12). That is the name displayed in the message.

Thanks,

Sobhan.

0 Kudos

I meant are you passing BDC03(12) or Z-BDC03(12) to the BDC. The field name according to the technical information is Z-BDC03(12).

Rob

0 Kudos

Rob,

The following is the statement:

perform bdc_field using 'BDC03(12)' wa_rec-12.

Thanks,

Sobhan.

0 Kudos

Try:



perform bdc_field using 'Z-BDC03(12)' wa_rec-12.

Rob

0 Kudos

Rob,

Thanks for your help. I tried with Z-BDC03(12). Now it gave me the following mesage.

Field Z-BDC03(12) is not an ibput field.

Thanks,

Sobhan.

0 Kudos

Well, I guess that's progress. You are running it in mode 'E', so is the 12th line amount open for input when you get the message?

Rob

0 Kudos

Rob,

Do you mind if you can elaborate in detail?

Thanks,

Sobhan.

0 Kudos

When you get the error message in mode 'E', you have anumber of lines filled in with cost elements and amounts. The last line is a total line. Is it the 11th, 12th or 13th line on the screen? Is this the one you are trying to change?

Rob

0 Kudos

Rob,

Thank you for your great help. The last line is 13. Only first 12 lines are filled from the input file/internal table. The 13th line is sum of all first 12 lines. The error message is coming on line 12. If I comment line 12, it gives the error message on line 11 which is bdc03(11). But one thing I noticed is Call transaction sy-subrc =0.

Thanks,

Sobhan.

0 Kudos

If 12 lines are filled from your file, try putting it line 14 (the one after the total).

Rob

0 Kudos

Rob,

Then don't I need to change the screen to have the 14th line to be appeared?

Thanks,

Sobhan.

0 Kudos

That's right; you only have 13 lines. Try filling one fewer and put this on the 13th line - just to see if this works. If it does, you'll have to use one of the techniques Rich or I suggested earlier to fill more entries.

Rob

0 Kudos

Sobhan - did this work out for you?

Rob

0 Kudos

Hi Rob,

Thanks for the great help. I didn't try your last solution. Meanwhile what I have done was I changed the mode from E to N. I am waiting on user to test it and tell me the result. The reason for doing this is the call transaction is giving sy-subrc = 0.

Please let me know your comments on this.

Thanks,

Sobhan.

0 Kudos

Hi Rob,

Thanks for the help. Finally the problem was fixed. The first problem is fixed by your idea of replacing BDC03 (12) by Z-BDC03 (12). Not only just for 12th field but also all other 11 fields. The second issue is the BDCDATA table was not initialized in the previous BDC CALL transaction.

Thanks for all the great help.

Thanks,

Sobhan.