Skip to Content
0

Save SE37 input data as variant programatically

Jan 04, 2017 at 09:57 PM

84

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Yogesh Gupta Jan 05, 2017 at 12:44 AM
1

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.

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Jan 04, 2017 at 10:26 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded