Application Development and Automation 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: 
Read only

BDC help

Former Member
0 Likes
1,472

Hello,

I am tryitng to create a recording for transaction pa40 for reassigning employees from one position to another.

I go to sm35 and create a new recording.

Could anyone please guide me through the steps required to complete this process. I get quite a few errors through the steps.

Thanks,

~Mark

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,440

Hi Mark,

Can u pls tell the errors ,which u are getting through the process.

Regards,

Sharath

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,440

Create your recording in transaction SHDB.

Regards,

RIch HEilman

Read only

0 Likes
1,440

Click New Recording....Enter the name of your recording, then the transaction code PA40, click Start Recording. You will now see the PA40 screen. Do whatever you need to do and back out of the transaction. You will now see the "Edit Recording" Screen, click save, then back. Now you see your recording in the table control, select it, and click program. Enter a program name, "ZWHATEVER". Click Transfer from Recording. Click green check, now give title to your program, click source code, now assign dev class. Now you see all of the BDC code that you need. You can copy and paste this code into your other program.

Regards,

Rich HEilman

Read only

0 Likes
1,440

Hi Rich,

Yes, sm35 actually takes me to SHDB once i select Recording from there. But somehow I get so many different errors and warnings which I don't get when I simply modify from PA40.

Please advise!

~Mark

Read only

0 Likes
1,440

Hi Try this.

Record SHDB for PA40.

then write a Zprogram to call transaction PA40.

OPEN DATASET: INFILE FOR INPUT IN TEXT MODE MESSAGE V_MSG.

IF SY-SUBRC NE 0.

WRITE:/ 'Input File Problem check the UNIX system '.

WRITE:/ INFILE, V_MSG.

EXIT.

ENDIF.

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

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

  • Start of processing *

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

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

DO.

READ DATASET: INFILE INTO PAY.

IF SY-SUBRC NE 0.

EXIT.

ENDIF.

*

ADD 1 TO COUNT.

*

REFRESH BDC_TAB.

CLEAR BDC_TAB.

PERFORM SCREEN1.

PERFORM SCREEN2.

PERFORM SCREEN3.

PERFORM SCREEN4.

PERFORM SCREEN5.

PERFORM SCREEN6.

PERFORM SCREEN7.

PERFORM SCREEN8.

CALL TRANSACTION 'PA40'

USING BDC_TAB MODE 'A'

MESSAGES INTO MESSTAB.

*if more than 50 transactions commit the work

IF DB_COUNT GT 50.

COMMIT WORK.

CLEAR DB_COUNT.

ENDIF.

ADD 1 TO DB_COUNT.

ENDDO.

Fill the screnns in Subroutines as :

  • Build Header *

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

FORM SCREEN1.

CASE PAY-EMPTYP.

WHEN 'P'.

CASE PAY-FILENAME.

WHEN 'A'.

SUBGRP = 'D2'.

WHEN 'B'.

SUBGRP = 'D2'.

WHEN 'C'.

SUBGRP = 'D1'.

WHEN 'V'.

SUBGRP = 'D2'.

ENDCASE.

WHEN 'C'.

SUBGRP = 'D3'.

ENDCASE.

*put date into ddmmyyyy format

CONCATENATE PAY-HIREDDMM '19' PAY-HIREYY INTO DATE8.

PERFORM DYNPRO USING:

'X' 'SAPMP50A' '2000',

' ' 'RP50G-PERNR' SPACE,

' ' 'RP50G-EINDA' DATE8,

' ' 'RP50G-SELEC(2)' 'X',

' ' 'RP50G-WERKS(2)' 'AUS',

' ' 'RP50G-PERSG(2)' '1',

' ' 'RP50G-PERSK(2)' SUBGRP,

' ' 'BDC_OKCODE' '/00'.

ENDFORM.

and so on.. based on screen sequence.

Read only

Former Member
0 Likes
1,440

Hi Mark,

I understand you are going to SM35 trans. and from there selecting Recording button which takes you to SHDB transaction.

Now to create recording, Select new recording button from application toolbar, enter your recording name, TCode and select Start recording. PA40 screen will come up. Enter the required values and complete the recording.

Please let me know what error you are getting.

sharmistha

Read only

Former Member
0 Likes
1,440

Hi,

If u want to call a transaction and goto a particular screen as soon as u call the transaction, u can record the flow in BDC.

That is u have to goto SHDB transaction for recording and then specify the transaction code then pass the values and once u reach the screen, press save button and press back.

Code will get automatically generated.

Then u can copy and paste the part of the code that is needed.

In detail:

Step 1:First go to SHDB transaction.

Step 2:Give the name of the transaction you want to record and enter some name for recording.

Step 3:Fill the required fields while recording.

Step 4:After the recording is completed,replace the value by the variable or anything related to that in your program.

Check this link.You can find lot of information about BDC with examples.

http://www.sap-img.com/abap.htm

Hope this helps.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,440

Hi,

Step 1: Go to SHDB transaction.

Step 2:Click New Recoding

Step 3:Fill the recording name and Transaction name(PA40)

Step 4:Click Start Recording

Step 5:Enter the pernr and other required details

Step 6:Click execute button

Step 7:As soon as you entered all the fields,press save button.Then you will get the coding for the recording made.

Step 8:Save it and press back button to save it in program.

Step 9:Replace the value by the appropriate workarea value or variable in the program.

Kindly reward points,if it helps you.

Read only

Former Member
0 Likes
1,440

Hi mark mark

Just Follow this link,Which contains steps required to create a recording.

http://help.sap.com/saphelp_erp2005/helpdata/en/67/42fcd8f61011d1bcf9080009b4534c/frameset.htm

Reply back,if face problems.

Cheers,

Vijay Raheja

Read only

Former Member
0 Likes
1,441

Hi Mark,

Can u pls tell the errors ,which u are getting through the process.

Regards,

Sharath

Read only

0 Likes
1,440

I save the recording and make it as a function module. After executing the function module, when I look in pa40 I can see that the change has been made but when I get the information from the org side, I still get the old data. So the change is not being passed on to the org side.

Any ideas?

~Mark

Read only

0 Likes
1,440

Mark Mark,

SHDB just follows the path which you do as a online transaction. Check if you have to do something extra to get that linked to Org side. I mean if you post PA40 transaction manually then do you see that info. in ORG chart? If yes then run the same process while recording your PA40 transaction in SHDB.

Hope this helps.

Bipin

Read only

0 Likes
1,440

Hello guys,

When I try to create a function module from the recording it does that but when I try to run the function module, I get the error that "error generating the test frame".

When I try to re-activate the function module, I get the error:

"The text literal "' %_RFC " is longer than 255characters. Check whether it ends properly"

It is not allowing me to edit the file since it is auto generated. Any ideas what I might be doing wrong?

Thanks,

~Mark