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: 

Save SE37 input data as variant programatically

Former Member
0 Kudos

Hi Experts,

I need to save input data of a FM in background.

We make a call to legacy system via FM and sometime the call fails, if it fails we can save FM input data as variant and re run it later on with same variant.

Thanks

Yogesh Gupta

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

I think that the easiest way is to serialize the data objects and save them to the database, and create a program to deserialize them and run the function module. cf statement CALL TRANSFORMATION ID. If some of the parameters contain class instances, then it may require much more work.

Former Member

Got Answer:

1. Find the RFC user which will call your FM/BAPI. Usually maintained by basis in SM59

2. Request your security team to add parameter id FBGENDAT as X in user master (Transaction SU01)

3. Execute report FBGENDAT.

4. Enter the name of the FM/BAPI which you wish to create test data directory and execute the report. The options used are self explanatory and is available in report. Option C is meant to debug using process(Transaction SM50)

5. In your FM/BAPI, write below lines of code. Certain SAP Standard FM/BAPI already have below code in them. Example BAPI_PO_CHANGE.

INCLUDE FBGENMAC.

SET EXTENDED CHECK OFF.

fbgenmac ‘<<YOUR_FM_NAME>>’.

SET EXTENDED CHECK ON.