Skip to Content
0
Former Member
Feb 01, 2010 at 01:46 PM

[APO] Problem with 'jumping' to planning book

125 Views

Hi there dear ABAPers.

I've got a severe problem. In our z-transaction there was an functionality that enables user to jump directly to planning book (/sapapo/sdp94 transaction) from our z-report. there was a producst list (presented in ALV-grid) and then after pressing right button on a single product the context menu appeared with option 'Jump to Planning Book'. User was then taken to the /sapapo/sdp94 transaction where had this particular product displayed.

That piece of code looks more or less like this:

      REFRESH l_alert_tab.
      CONCATENATE sy-datum sy-uzeit INTO i_time_date.
      MOVE i_time_date TO l_vfrom. 
      MOVE i_time_date TO l_vto. 
      MOVE: '/SAPAPO/AIF_DP_SHOW' TO l_functionmodule.
      l_alert_str-aot = '4000'.
      l_alert_str-info(3) = '000'. "Planning version
      l_alert_str-info+22(20)   = 'Z_SNP_INTERACTIVE' . "Planning book
      l_alert_str-info+162(20)  = 'Z_VISIBILITY_TOOL' . "Planning book data view
      l_alert_str-info+376(20) = wa_z09merplanning-locno. "Location
      l_alert_str-info+458(45) = wa_z09merplanning-material. "Material
      APPEND l_alert_str TO l_alert_tab. 

      CALL FUNCTION '/SAPAPO/AMON_CALL_SOLVER'
        STARTING NEW TASK 'AMON'
        EXPORTING
          i_vfrom     = l_vfrom
          i_vto       = l_vto
          i_function  = l_functionmodule
        TABLES
          i_alert_tab = l_alert_tab.

In result user was redirected to /sapapo/sdp94 in new window with the specific material, location, planning version, planning book and planning data view.

The problem is that afer system upgrade that functionality has broken. Now user is taken to the /sapapo/sdp94 to specific planning book ald planning view. But selections about material, location and planning version are not filled and transaction throws error.

Have you got some idea how to approach/debug this problem? It's not clear for me how '/SAPAPO/AMON_CALL_SOLVER' (or '/SAPAPO/AIF_DP_SHOW') FModule passes the product/planning version/location data to planning book. All parameters are passed in l_alert_tab tab - field info that is of type /SAPAPO/C_APPL_INFO_LANG (CHAR 1024).

Maybe there is some other reasonable way to 'jump' to planning boog with parameters mentioned? (I mean material, location, planning version, planning book and planning data view).

I will be thankful for all of your suggestions becasue I've got no idea so far how to approach thos problem.

Regards. P.