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: 

BDC

Former Member
0 Kudos
109

Hi

All

Is there any other way to create a BDC except RECORDING.??

Wht is it ?

Wht is the best way to debugg a BDC program ??

Thanks

lokesh

6 REPLIES 6

Former Member
0 Kudos
74

Ya

otherway would be Direct Input method with the use of standard direct input programs....

put a break point where exacty you want to check the values.... and execute the program.. thats it

Former Member
0 Kudos
74

You need to do a recording dude!

Use mode A which will display all that is happening.


CALL TRANSACTION 'TCODE'
  USING bdc_tab
        MODE 'A'
        UPDATE 'S'
        MESSAGES INTO bdc_msg.

Or find a suitable BAPI to do the posting, update, etc. This will totally remove the recording.

Former Member
0 Kudos
74

Ya

otherway would be Direct Input method with the use of standard direct input programs....

another way would be instead of recording write the whole logic by your self... i.e. create two routines one for detecting the transaction and screen

next one for decting the fields and its value.. call those two routines for each n every screen and fields in the sequence....

put a break point where exacty you want to check the values.... and execute the program.. thats it

Former Member
0 Kudos
74

<b>DEBUG BDC</b>

ust go into debugging mode and do the BDC step by step, when it comes to the Call Transaction line, check the mode which will be 'N'....Now, overwrite this with 'A' and execute the BDC...It will run in All Screens Mode....

As suggested above the MODE 'A' will do the trick as it takes you to all screens.

Normally MODE N will be defaulted as it will be used for background processing,

Here is a simple tip,

This will be the call transaction part of the program,

CALL TRANSACTION 'IW32' USING BDCDATA MODE 'N'

MESSAGES INTO MESSTAB.

I would suggest you to make it like this,

DATA: V_MODE TYPE C VALUE 'N'.

*<In debug mode set V_MODE = 'A' for debugging>

CALL TRANSACTION 'IW32' USING BDCDATA MODE V_MODE

MESSAGES INTO MESSTAB.

This will be very useful because you just need to change the value of the V_MODE at runtime as A for debugging besides it has N which is the default to be used. (i.e. you need not change the code again and again).

This will be very useful when you have to debug some program in QA or PRD servers.

For BDC Debug, Refer the foll.thread,

BDC: you should choose DISMODE = 'A'.

*************************************

<b>BDC without recording</b>.....

But you need to know the following details before writing the programs.

1)

<b>Program</b> SAPLWBABAP

<b>Screen number</b> 0100

2)BDC_OKCODE's for that screen in the Transaction.

Ex: =CHAP

3)Screen Fields.

Ex:RS38M-PROGRAMM

Then you can write a program for that Transaction.

Ex:Consider this code snippet for SE38.

PERFORM bdc_dynpro USING 'SAPLWBABAP' '0100'.

PERFORM bdc_field USING 'BDC_CURSOR'

'RS38M-PROGRAMM'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=CHAP'.

PERFORM bdc_field USING 'RS38M-PROGRAMM'

'ZZTEST_SE38'.

So there is no point in investigating all these detials, the best approach is do a BDC Recording (SHDB ), then let the transaction(SHDB) prepare the program and then you modify the program according to your needs.

That is

You can write a BDC Program without recording in SHDB provided you should be knowing the <b>program name, screen numbers, ok codes, field names</b>.

otherway would be Direct Input method with the use of standard direct input programs

Regards

vasu

Former Member
0 Kudos
74

OOPS !...this message is not for u

Former Member
0 Kudos
74

Hi

in SESSION AND CALL TRANSACTION methods you need to creat the screen flow which available in SHDB

with out recording also yu can do it but it will take much time to see each and every screen and what are the fields and screen numbers and program names

so better to use shdb

<b>

Reward if usefull</b>