Skip to Content
avatar image
Former Member

Save SE37 input data as variant programatically

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 05, 2017 at 12:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 04, 2017 at 10:26 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded