Skip to Content
avatar image
Former Member

Skipping a fixed cell using a macro.

When executing a macro in background which copies a key figure value from the current week to the end of the horizon I have been receiving the following error in the SM37 logs:

Error for COM routine using application program (return code 40,075)

I am therefore trying to write a macro that skips the cell which has a fixed value but it does not seem to work and I still receive the above COM error

Roll Forward Cost : ( 109 Iterations : W 31.2013; W 35.2015 )

IF

Check Fixing Status and unfix

IS_FIXED(

Row: Dual Cost ( Frm W 32.2013 )

) = 0

AND

IS_PARTLY_FIXED(

Row: Dual Cost ( Frm W 32.2013 )

) = 0

Row: Dual Cost ( Frm W 32.2013 ) =

Row: Dual Cost ( Frm W 31.2013 )

ENDIF

Note the Arguement Row Attributes in the IS_FIXED(Row: Dual Cost ( Frm W 32.2013 )) = 0 have been set to ROW ATTRIBUTES. Does any see why this macro should not have the desired results?

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Aug 03, 2013 at 07:26 AM

    Hello, you can try to find out the issue by yourself refering my documents:

    http://scn.sap.com/docs/DOC-44540

    http://scn.sap.com/docs/DOC-44692

    (Sorry the document is still not completely finished ... )


    For this specific issue, you can first set a breakpoint in the below function modules in SE37 (set BP at the first executable line would be fine):

    -/SAPAPO/ADVF_IS_FIXED

    -/SAPAPO/ADVF_IS_PARTLY_FIXED

    Then you go into the planning book and run the macro, and you'll stop in the FMs. You directly retrun to the calling coding (which is the macro program) by pushing F7 here, and check the return value 'f_argument'. Do you get the correct result from the function modules?

    Please notice the FMs will be called for every bucket, make sure you check the correct one by checking the 'ACT_COLUMN' parameter for the FMs.

    When you reach the BP, and you push F7, you'll reach a line after a coding like:

    ------

    call function '/SAPAPO/ADVF_IS_FIXED'
    exporting
    act_column = act_column
    tables
    value_tab = l_t_value_tab
    changing
    c_t_tab = c_t_tab
    f_calc_error = g_flg_calc_error
    f_argument = 4UQHSNQDTZY8QHT6OKHY6OISB.

    --------

    Here you check 'act_column' value first, which is the column index. Then you check the variant '4UQHSNQDTZY8QHT6OKHY6OISB' (should be different in your system), which is the return value.

    If for the input key figure, cell in column 'act_column' is fixed, the above FM should return 1.

    Just have a try 😉

    Best Regards,

    Ada

    Add comment
    10|10000 characters needed characters exceeded