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: 

xd01

Former Member
0 Kudos

hi,

i want the bdc code for xd01 and internal table structure.

plz help me.

thanks regards,

kiran.

11 REPLIES 11

Former Member
0 Kudos

In LSMW you have standard program to Create Customer.

Check that.

0 Kudos

hi singh what is standard program inlsmw

0 Kudos

hi Kiran,

Here is the complete Code

REPORT ZTEST_01

NO STANDARD PAGE HEADING LINE-SIZE 255.

INCLUDE BDCRECX1.

START-OF-SELECTION.

PERFORM OPEN_GROUP.

PERFORM BDC_DYNPRO USING 'SAPMF02D' '7100'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RF02D-KUNNR'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=ENTR'.

PERFORM BDC_FIELD USING 'RF02D-KTOKD'

'4321'.

PERFORM BDC_DYNPRO USING 'SAPMF02D' '7000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=ENTR'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'ADDR1_DATA-COUNTRY'.

PERFORM BDC_FIELD USING 'SZA1_D0100-TITLE_MEDI'

'Mr'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-NAME1'

'Santosh'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-COUNTRY'

'IN'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-LANGU'

'EN'.

PERFORM BDC_DYNPRO USING 'SAPMF02D' '7000'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=UPDA'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'SZA1_D0100-TITLE_MEDI'.

PERFORM BDC_FIELD USING 'SZA1_D0100-TITLE_MEDI'

'Mr'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-NAME1'

'Santosh'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-COUNTRY'

'IN'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-TIME_ZONE'

'INDIA'.

PERFORM BDC_FIELD USING 'ADDR1_DATA-LANGU'

'EN'.

PERFORM BDC_TRANSACTION USING 'XD01'.

PERFORM CLOSE_GROUP.

Regards,

Santosh

Note: Reward Points if helpful

Former Member
0 Kudos

hi Kiran,

here is the recording for the same

perform bdc_dynpro using 'SAPMF02D' '7100'.

perform bdc_field using 'BDC_CURSOR'

'RF02D-KUNNR'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'RF02D-KTOKD'

'4321'.

perform bdc_dynpro using 'SAPMF02D' '7000'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'BDC_CURSOR'

'ADDR1_DATA-COUNTRY'.

perform bdc_field using 'SZA1_D0100-TITLE_MEDI'

'Mr'.

perform bdc_field using 'ADDR1_DATA-NAME1'

'Santosh'.

perform bdc_field using 'ADDR1_DATA-COUNTRY'

'IN'.

perform bdc_field using 'ADDR1_DATA-LANGU'

'EN'.

perform bdc_dynpro using 'SAPMF02D' '7000'.

perform bdc_field using 'BDC_OKCODE'

'=UPDA'.

perform bdc_field using 'BDC_CURSOR'

'SZA1_D0100-TITLE_MEDI'.

perform bdc_field using 'SZA1_D0100-TITLE_MEDI'

'Mr'.

perform bdc_field using 'ADDR1_DATA-NAME1'

'Santosh'.

perform bdc_field using 'ADDR1_DATA-COUNTRY'

'IN'.

perform bdc_field using 'ADDR1_DATA-TIME_ZONE'

'INDIA'.

perform bdc_field using 'ADDR1_DATA-LANGU'

'EN'.

perform bdc_transaction using 'XD01'.

The below mentioned ones are the Internal Table

Structure for XD01 Transaction

DATA: BEGIN OF DPLTAB OCCURS 3,

KUNNR LIKE KNA1-KUNNR,

NAME1 LIKE KNA1-NAME1,

STRAS LIKE KNA1-STRAS,

PSTLZ LIKE KNA1-PSTLZ,

ORT01 LIKE KNA1-ORT01,

LAND1 LIKE KNA1-LAND1,

END OF DPLTAB.

*------- Interne Tabelle für die USt-Id-Duplikate -

-


DATA: BEGIN OF STCEG_TAB OCCURS 3,

KUNNR LIKE KNA1-KUNNR,

NAME1 LIKE KNA1-NAME1,

ORT01 LIKE KNA1-ORT01,

LAND1 LIKE KNA1-LAND1,

STCEG LIKE KNA1-STCEG,

END OF STCEG_TAB.

*------- Interne Tabelle für die Feldinhalte von Dynprofeldern -

-


DATA: BEGIN OF DYNPFIELDS OCCURS 1.

INCLUDE STRUCTURE DYNPREAD.

DATA: END OF DYNPFIELDS.

Regards,

Santosh

0 Kudos

hi santosh,

can u give me the complete code

including internal table structure

former_member181966
Active Contributor
0 Kudos

Pl check the thread :

http://www.sapfans.com/sapfans/forum/intface/messages/3949.html

Hope this’ll give you idea!!

<b>P.S award the points.</b>

Good luck

Thanks

Saquib Khan

"Some are wise and some are otherwise"

Former Member
0 Kudos

Kiran,

Best way to get BDC code is goto transaction SHDB and record transaction.

Once you generate transaction assign program name which will have BDC code.

Then you can modify the program and replace hardcoded values with values from Internal table.

If you want then I can send you sample code where you just need to replace internal table & fields and BDC code generated using SHDB. Please let me know your email id.

Cheers,

Nilesh

0 Kudos

Hi,

please send me bdc code for xd01

my id is: varun@gravitymicrosystem.com

thanks

varun

0 Kudos

also consider using VD01 for your recording and BCD processing.

0 Kudos

whats different in vd01.

are there no table controls in the transaction.

Former Member
0 Kudos

Kiran,

Best way to get BDC code is goto transaction SHDB and record transaction.

Once you generate transaction assign program name which will have BDC code.

Then you can modify the program and replace hardcoded values with values from Internal table.

If you want then I can send you sample code where you just need to replace internal table & fields and BDC code generated using SHDB. Please let me know your email id.

Cheers,

Nilesh