‎2021 Jan 05 5:55 AM
Hi,
I am tried to upload excel sheet to sap using bdc call transaction method based on the condition of acctype and fisical year for that i write code like as shown in below
if it_datatab is not INITIAL.
select belnr
bukrs
gjahr
buzei
koart
from
bseg into table it_bseg FOR ALL ENTRIES IN it_datatab
where belnr = it_datatab-belnr and bukrs = it_datatab-bukrs and gjahr = it_datatab-gjahr
and koart = 'K'.
endif.
loop at it_datatab into wa_datatab .
READ TABLE it_bseg into wa_bseg with key belnr = wa_datatab-belnr.
if sy-subrc eq 0.
perform bdc_dynpro using 'SAPMF05L' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RF05L-BELNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF05L-BELNR'
wa_datatab-belnr.
perform bdc_field using 'RF05L-BUKRS'
wa_datatab-bukrs.
perform bdc_field using 'RF05L-GJAHR'
wa_datatab-gjahr.
perform bdc_field using 'RF05L-BUZEI'
it_bseg-buzei.
perform bdc_field using 'RF05L-XKKRE'
'X'.
perform bdc_dynpro using 'SAPMF05L' '0300'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-SGTXT'.
perform bdc_field using 'BDC_OKCODE'
'=AE'.
perform bdc_field using 'BSEG-ZUONR'
wa_datatab-zuonr.
perform bdc_field using 'BSEG-SGTXT'
wa_datatab-sgtxt.
endif.
CALL TRANSACTION 'FB09' USING bdcdata MODE 'A' UPDATE 'S'
MESSAGES INTO messtab.
but my excel sheet data was not uploading on this condition
my excel sheet contain document num,company code, fisical year ,assignment,text fields
please tell me what wrong i did in the code.
Regards,
‎2021 Jan 11 2:06 PM
‎2021 Jan 05 7:45 AM
No idea, too little information: what kind of error did you get? You're running in mode A, you should definitely see something happening, otherwise the error is happening during the creation phase.
‎2021 Jan 11 9:47 AM
I wrote my select stmt as shown in above
when i am checking in mode 'N' prog goes to dump and saying field symbol is not yet assigned and showing error in "macro_cell_data_get" this part
But when i processing in mode 'A' for first screen the data was taken from excel and then pressing enter it directed to second screen here also taking data from excel but after taking data from excel sheet to the second screen and then pressing it is not directed to next document number where i need to save it and go back for processing the 2nd record.The updation were not repeated continously
‎2021 Jan 05 7:58 AM
I am running in mode A but my data in excel sheet was not uploading into sap if I removing if condition then its is working fine .But my problem is if the account type is "k" then only the data wanted to entered into sap for that particular document number can you please help me to solve this problem
‎2021 Jan 05 10:34 AM
‎2021 Jan 08 12:41 PM
‎2021 Jan 11 9:46 AM
I wrote my select stmt as shown in above
when i am checking in mode 'N' prog goes to dump and saying field symbol is not yet assigned and showing error in "macro_cell_data_get" this part
But when i processing in mode 'A' for first screen the data was taken from excel and then pressing enter it directed to second screen here also taking data from excel but after taking data from excel sheet to the second screen and then pressing it is not directed to next document number where i need to save it and go back for processing the 2nd record.The updation were not repeated continously
‎2021 Jan 11 2:06 PM
‎2021 Jan 11 5:00 PM
Thanks for your response
for mode 'A' screens processing correctly
But for mode 'N' it goes to short dump says "field symbol is not yet assigned" .I checked in st22 there it showing error in below part
macro_cell_data_get
<ls_fcat>
<ls_data>
<l_field_value>
ls_lvc_data-value.
please help me to find out this
‎2021 Jan 12 9:52 AM