02-01-2007 4:53 PM
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.
02-01-2007 5:03 PM
(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
02-01-2007 4:58 PM
02-01-2007 5:01 PM
Rob,
Thanks for the response. Yes, it has scroll down bar and I can scroll down.
Thanks,
Sobhan.
02-01-2007 5:03 PM
(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
02-01-2007 5:09 PM
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
02-01-2007 5:15 PM
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
02-01-2007 5:22 PM
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.
02-01-2007 5:30 PM
02-01-2007 5:37 PM
Rob,
Yes, I am sure it is BDC03(12). That is the name displayed in the message.
Thanks,
Sobhan.
02-01-2007 5:44 PM
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
02-01-2007 5:48 PM
Rob,
The following is the statement:
perform bdc_field using 'BDC03(12)' wa_rec-12.
Thanks,
Sobhan.
02-01-2007 6:34 PM
02-01-2007 6:53 PM
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.
02-01-2007 6:57 PM
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
02-01-2007 7:10 PM
02-01-2007 7:23 PM
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
02-01-2007 7:32 PM
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.
02-01-2007 7:43 PM
If 12 lines are filled from your file, try putting it line 14 (the one after the total).
Rob
02-01-2007 7:46 PM
Rob,
Then don't I need to change the screen to have the 14th line to be appeared?
Thanks,
Sobhan.
02-01-2007 7:52 PM
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
02-05-2007 4:00 PM
02-05-2007 4:43 PM
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.
02-12-2007 9:22 PM
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.