05-29-2013 3:13 PM
Hi Everyone,
When normal user adds positions to table in transaction VA22, he needs to fill material number, quantity and unit. Rest of the data are filled automatically after proceding a screen.
I need to import positions data from file (CSV). To do this I eddited screen 4411 and add "Import" button (configuration to tables T185* is set). Problem is when I try to fill internal table xvbap. It's not filling the rest of data. Is it any simple way to import data from file and force transaction to proced as it was manual data imput?
PS. Someone told me that I can try to use BOM standard code to this but I don't know where to find it and even is this a good solution.
Best Regards,
Marcin
05-29-2013 5:27 PM
Hi Marcin,
can you record VA22 via batch-input? If so, you could use LSMW to insert data from the text file.
Regards,
Marc
05-30-2013 11:16 AM
Dear Marc,
Batch-Input would be fine if I'd like to start the transaction from the beggining. I need to fill the table at button click so Batch-Input won't help. Filling table from file is not a problem. Problem is to fill rest of data like in manual data input.
Regards,
Marcin
05-30-2013 5:09 AM
after filling up your data from the CSV file to the internal table pressing enter manually by user will fill the rest of the data rite? do you have problem doing this?
Or else, you can force the enter button by triggering PBO explicitly using the below code..
cl_gui_cfw=>flush( ).
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '/00'
EXCEPTIONS
function_not_supported = 1.
05-30-2013 11:18 AM
Unfortunatelly pressing enter after filling data is not helping. Due to this situation this method will not help. But thanks for reply.
Regards,
Marcin
05-30-2013 12:24 PM
05-30-2013 1:42 PM
Like I said it's not possible. File need to be uploaded in transaction after Import button click.
06-03-2013 3:52 PM
OK Guys,
I used function module DYNP_UPDATE_FIELDS and it works almost great except one thing. I can't add more rows than I seeon the screen. For example when I start VA22 I see 9 position rows in table control but I can't add more by this FM. Is there any solution to this?
Best Regards,
Marcin