2009 Jul 16 5:38 AM
hi guru's
I am doing the bdc for xd02, but its not picking up the value of field akont and taxkd.... so please help me on this matter...
i hv attached the sample code of the program... please checked it nd give me some help... its also giving error.. it can't interpret the flat file.... so pls give me the new code for that or edit the old one....
report Z_XDO2_NEW
no standard page heading line-size 255.
TYPES: BEGIN OF itab,
KUNNR TYPE KUNNR,
BUKRS TYPE BUKRS,
VKORG TYPE VKORG,
VTWEG TYPE VTWEG,
SPART TYPE SPART,
NAME1 TYPE NAME1,
SORTL TYPE SORTL,
NAME2 TYPE NAME2,
STRAS TYPE STRAS,
ORT01 TYPE ORT01,
PSTLZ TYPE PSTLZ,
LAND1 TYPE LAND1,
REGIO TYPE REGIO,
SPRAS TYPE SPRAS,
AKONT TYPE AKONT,
* ZTERM TYPE KNB1-ZTERM,
ZWELS TYPE KNB1-ZWELS,
AWAHR TYPE AWAHR,
VKBUR TYPE VKBUR,
* WAERS TYPE WAERS,
KONDA TYPE KONDA,
KALKS TYPE KALKS,
PLTYP TYPE PLTYP,
VERSG TYPE VERSG,
LPRIO TYPE LPRIO,
* KZAZU TYPE KZAZU,
VSBED TYPE VSBED,
VWERK TYPE VWERK,
ANTLF TYPE knvv-ANTLF,
PERFK TYPE PERFK,
PERRL TYPE PERRL,
INCO1 TYPE INCO1,
INCO2 TYPE INCO2,
TAXKD TYPE KNVI-TAXKD,
END OF ITAB.
*Internal table decleration
DATA : T_ITAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE.
include bdcrecx1.
start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\SAMPLE.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = T_ITAB.
perform open_group.
LOOP AT T_ITAB.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPMF02D' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-D0320'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
T_ITAB-KUNNR.
perform bdc_field using 'RF02D-BUKRS'
T_ITAB-BUKRS.
perform bdc_field using 'RF02D-VKORG'
T_ITAB-VKORG.
perform bdc_field using 'RF02D-VTWEG'
T_ITAB-VTWEG.
perform bdc_field using 'RF02D-SPART'
T_ITAB-SPART.
perform bdc_field using 'RF02D-D0110'
'X'.
perform bdc_field using 'RF02D-D0210'
'X'.
perform bdc_field using 'RF02D-D0120'
'X'.
perform bdc_field using 'RF02D-D0215'
'X'.
perform bdc_field using 'RF02D-D0310'
'X'.
perform bdc_field using 'RF02D-D0315'
'X'.
perform bdc_field using 'RF02D-D0320'
'X'.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-SPRAS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-NAME1'
T_ITAB-NAME1.
perform bdc_field using 'KNA1-SORTL'
T_ITAB-SORTL.
perform bdc_field using 'KNA1-NAME2'
T_ITAB-NAME2.
perform bdc_field using 'KNA1-STRAS'
T_ITAB-STRAS.
perform bdc_field using 'KNA1-ORT01'
T_ITAB-ORT01.
perform bdc_field using 'KNA1-PSTLZ'
T_ITAB-PSTLZ.
perform bdc_field using 'KNA1-LAND1'
T_ITAB-LAND1.
perform bdc_field using 'KNA1-REGIO'
T_ITAB-REGIO.
perform bdc_field using 'KNA1-SPRAS'
T_ITAB-SPRAS.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-AKONT'
T_ITAB-AKONT.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZWELS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-ZTERM'
'ZPT2'.
perform bdc_field using 'KNB1-ZWELS'
T_ITAB-ZWELS.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-AWAHR'
T_ITAB-AWAHR.
perform bdc_field using 'KNVV-VKBUR'
T_ITAB-VKBUR.
perform bdc_field using 'KNVV-WAERS'
'INR'.
perform bdc_field using 'KNVV-KONDA'
T_ITAB-KONDA.
perform bdc_field using 'KNVV-KALKS'
T_ITAB-KALKS.
perform bdc_field using 'KNVV-PLTYP'
T_ITAB-PLTYP.
perform bdc_field using 'KNVV-VERSG'
T_ITAB-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-LPRIO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-LPRIO'
T_ITAB-LPRIO.
perform bdc_field using 'KNVV-KZAZU'
'X'.
perform bdc_field using 'KNVV-VSBED'
T_ITAB-VSBED.
perform bdc_field using 'KNVV-VWERK'
T_ITAB-VWERK.
perform bdc_field using 'KNVV-ANTLF'
T_ITAB-ANTLF.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-PERFK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-PERFK'
T_ITAB-PERFK.
perform bdc_field using 'KNVV-PERRL'
T_ITAB-PERRL.
perform bdc_field using 'KNVV-INCO1'
T_ITAB-INCO1.
perform bdc_field using 'KNVV-INCO2'
T_ITAB-INCO2.
perform bdc_field using 'KNVV-ZTERM'
'ZPT3'.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVI-TAXKD(01)'
T_ITAB-TAXKD.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_transaction using 'XD02'.
ENDLOOP.
perform close_group.Edited by: Manish Sharma on Jul 16, 2009 6:42 AM
Edited by: Manish Sharma on Jul 16, 2009 6:47 AM
Edited by: Manish Sharma on Jul 16, 2009 6:47 AM
2009 Jul 16 5:48 AM
Hi Manish,
Is seems to be a conversion of characters probelm.
Run this BDC in DEBUG mode by putiing a stop at LOOP at T_ITAB.
Check if the vaule against these fields fetched in your internal table or not.
Secondly, use CONVERSION_EXIT_ALPHA_INPUT FM for this value before passing to BDC field.
Hope it works or atleast give you some clue regarding the problem.
Regds,
ANil
hi guru's
I am doing the bdc for xd02, but its not picking up the value of field akont and taxkd.... so please help me on this matter...
i hv attached the sample code of the program... please checked it nd give me some help... its also giving error.. it can't interpret the flat file.... so pls give me the new code for that or edit the old one....
report Z_XDO2_NEW
no standard page heading line-size 255.
TYPES: BEGIN OF itab,
KUNNR TYPE KUNNR,
BUKRS TYPE BUKRS,
VKORG TYPE VKORG,
VTWEG TYPE VTWEG,
SPART TYPE SPART,
NAME1 TYPE NAME1,
SORTL TYPE SORTL,
NAME2 TYPE NAME2,
STRAS TYPE STRAS,
ORT01 TYPE ORT01,
PSTLZ TYPE PSTLZ,
LAND1 TYPE LAND1,
REGIO TYPE REGIO,
SPRAS TYPE SPRAS,
AKONT TYPE AKONT,
* ZTERM TYPE KNB1-ZTERM,
ZWELS TYPE KNB1-ZWELS,
AWAHR TYPE AWAHR,
VKBUR TYPE VKBUR,
* WAERS TYPE WAERS,
KONDA TYPE KONDA,
KALKS TYPE KALKS,
PLTYP TYPE PLTYP,
VERSG TYPE VERSG,
LPRIO TYPE LPRIO,
* KZAZU TYPE KZAZU,
VSBED TYPE VSBED,
VWERK TYPE VWERK,
ANTLF TYPE knvv-ANTLF,
PERFK TYPE PERFK,
PERRL TYPE PERRL,
INCO1 TYPE INCO1,
INCO2 TYPE INCO2,
TAXKD TYPE KNVI-TAXKD,
END OF ITAB.
*Internal table decleration
DATA : T_ITAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE.
include bdcrecx1.
start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\SAMPLE.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = T_ITAB.
perform open_group.
LOOP AT T_ITAB.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPMF02D' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-D0320'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
T_ITAB-KUNNR.
perform bdc_field using 'RF02D-BUKRS'
T_ITAB-BUKRS.
perform bdc_field using 'RF02D-VKORG'
T_ITAB-VKORG.
perform bdc_field using 'RF02D-VTWEG'
T_ITAB-VTWEG.
perform bdc_field using 'RF02D-SPART'
T_ITAB-SPART.
perform bdc_field using 'RF02D-D0110'
'X'.
perform bdc_field using 'RF02D-D0210'
'X'.
perform bdc_field using 'RF02D-D0120'
'X'.
perform bdc_field using 'RF02D-D0215'
'X'.
perform bdc_field using 'RF02D-D0310'
'X'.
perform bdc_field using 'RF02D-D0315'
'X'.
perform bdc_field using 'RF02D-D0320'
'X'.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-SPRAS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-NAME1'
T_ITAB-NAME1.
perform bdc_field using 'KNA1-SORTL'
T_ITAB-SORTL.
perform bdc_field using 'KNA1-NAME2'
T_ITAB-NAME2.
perform bdc_field using 'KNA1-STRAS'
T_ITAB-STRAS.
perform bdc_field using 'KNA1-ORT01'
T_ITAB-ORT01.
perform bdc_field using 'KNA1-PSTLZ'
T_ITAB-PSTLZ.
perform bdc_field using 'KNA1-LAND1'
T_ITAB-LAND1.
perform bdc_field using 'KNA1-REGIO'
T_ITAB-REGIO.
perform bdc_field using 'KNA1-SPRAS'
T_ITAB-SPRAS.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-AKONT'
T_ITAB-AKONT.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZWELS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNB1-ZTERM'
'ZPT2'.
perform bdc_field using 'KNB1-ZWELS'
T_ITAB-ZWELS.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-AWAHR'
T_ITAB-AWAHR.
perform bdc_field using 'KNVV-VKBUR'
T_ITAB-VKBUR.
perform bdc_field using 'KNVV-WAERS'
'INR'.
perform bdc_field using 'KNVV-KONDA'
T_ITAB-KONDA.
perform bdc_field using 'KNVV-KALKS'
T_ITAB-KALKS.
perform bdc_field using 'KNVV-PLTYP'
T_ITAB-PLTYP.
perform bdc_field using 'KNVV-VERSG'
T_ITAB-VERSG.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-LPRIO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-LPRIO'
T_ITAB-LPRIO.
perform bdc_field using 'KNVV-KZAZU'
'X'.
perform bdc_field using 'KNVV-VSBED'
T_ITAB-VSBED.
perform bdc_field using 'KNVV-VWERK'
T_ITAB-VWERK.
perform bdc_field using 'KNVV-ANTLF'
T_ITAB-ANTLF.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-PERFK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNVV-PERFK'
T_ITAB-PERFK.
perform bdc_field using 'KNVV-PERRL'
T_ITAB-PERRL.
perform bdc_field using 'KNVV-INCO1'
T_ITAB-INCO1.
perform bdc_field using 'KNVV-INCO2'
T_ITAB-INCO2.
perform bdc_field using 'KNVV-ZTERM'
'ZPT3'.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'KNVI-TAXKD(01)'
T_ITAB-TAXKD.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_transaction using 'XD02'.
ENDLOOP.
perform close_group.Edited by: Manish Sharma on Jul 16, 2009 6:42 AM
Edited by: Manish Sharma on Jul 16, 2009 6:47 AM
Edited by: Manish Sharma on Jul 16, 2009 6:47 AM
2009 Jul 16 5:48 AM
Hi Manish,
Is seems to be a conversion of characters probelm.
Run this BDC in DEBUG mode by putiing a stop at LOOP at T_ITAB.
Check if the vaule against these fields fetched in your internal table or not.
Secondly, use CONVERSION_EXIT_ALPHA_INPUT FM for this value before passing to BDC field.
Hope it works or atleast give you some clue regarding the problem.
Regds,
ANil
2009 Jul 16 7:02 AM
THANX FOR LAST REPLY....ITS TAKING ALL VALUE BUT NOT uploading THE FIELD ANTLF .(Max. partial deilievery).... SO PLS HELP ME ON THIS MATTER
2009 Jul 16 7:18 AM
Hi Manish Sharma,
In T-code XD02, can You let us know where is this filed * ANTLF .(Max. partial deilievery)* In which tab.
And Can You post Your latest Code in Proper manner.
Regards,
Suneel G
2009 Jul 16 7:22 AM
Hi Manish,
Can u tell me, what value system is passing in this field.
During debug, what value system is fetching in internal table field.
Are u running the BDC in Display mode??
As per my analysis the data type of this field is DEC and lenget is only one character.
Regds,
Anil.
2009 Jul 16 7:28 AM
the value is passing into the internal table but its not getting up during the uploading time...
iam using this bdc for changing mode to change some value...
2009 Jul 16 7:34 AM
ANTLF field is in shipping tab....
Iam copying the code its not coming in proper manner....
2009 Jul 16 7:35 AM
Try passing some number manually '0 to 9' in debug mode to this field for one record.
Regds,
Anil
2009 Jul 16 7:56 AM
i had put the value in the field during debug mode its not takin it during uploading time....
the value is coming in internal table.....
2009 Jul 16 8:13 AM
Dear Manish,
One more thing I want to suggest you to please check the data type declaration of this field you have used in you internal table declaration and what system has recorded during recording.
Just have a look at recording and assigning same in your program.
don't give any like parameter for this field.
Let me check same program at my system and let you confirm.
One more thing i would like to know, whether during bdc run the control goes to the shipping tab screen?
Regds,
Anil
2009 Jul 16 8:18 AM
yes control goes to shipping tab... i hv 3 field in this tab that has been uploading and changing.. only ANTLF field is not uploading...
2009 Jul 16 8:22 AM
Dear Manish,
Only change that you have to do is just change in table declaration as follows:
ANTLF TYPE C,
in place of
ANTLF TYPE KNVV-ANTLF,
I've tried this and it is picking the value.
Regds,
Anil
2009 Jul 16 8:31 AM
2009 Jul 16 8:36 AM
BUT THIS FIELD ONLY TAKE VALUE B/W 0 TO 9... IF SOMEBODY PUT THE VALUE MORE THAN 10 THEN IT WILL SHOW WRONG VALUE... IT HAS SOME SOLN PLS TELL ME...
2009 Jul 16 6:30 AM
THANX FOR LAST REPLY....ITS TAKING ALL VALUE BUT NOT uploading THE FIELD ANTLF .(Max. partial deilievery).... SO PLS HELP ME ON THIS MATTER
2009 Jul 16 8:08 AM
Hi Maneesh,
I think you need to look your Flat file properly. There must be some mismatch with your internal table and the flat file. Once you verify the flat file.
Regards,
Nitin.
Edited by: K Nitin Kumar Sethy on Jul 16, 2009 12:38 PM