Quantcast
Channel: SCN : Discussion List - SAP Advanced Planning & Optimization (SAP APO)
Viewing all 2068 articles
Browse latest View live

Macro using SUM function with Row & Column Relative

$
0
0

Hello Gurus,

 

I am trying to write a macro for the following scenario and below that is what i have so far.

 

             Col 1Col 2Col 3Col 4Col 5Col 6Col 7Col 8

Col 9

KF1380200

KF2

2001005018050505050

 

 

When macro reads value in KF1, it should sum up the values of KF1 & KF2 until that column.

If the sum(KF2) <  sum(KF1) value, turn KF1 Cell to RED.

 

 

IF

Condition

KF1 > 0 (Frm Col1)

AND

(

Function SUM (KF1 Col1, KF1 Col9)  [ Row Relative & Column Relative set for TO]

-

Function SUM ( KF2 Col1, KF2 Col9) [ Row Relative & Column Relative set for TO]

> 0 )

Attribute ( KF1) = RED    

ENDIF



I have not checked the row relative & column relative for the from row for both Key Figures since i want the calculation to start from Col1 for each iteration and progress the TO based on iteration column. The macro just turns all KF1 cells which have values to Red. Tried mix and match with Row/Column relative but nothings working so far. Appreciate your inputs.





Regards

AK


9AMALA Aggregates

$
0
0

Hi,

I am creating datasource from SNP Planning area by using 9AMALA Aggregates.

 

it's not Extracting all the data correctly from Planning area for a custom Keyfigure, which has a category type BF (Purchase Order )

 

Few of my records are missing.

 

suppose if i change it to 9AMALO, it's working fine.

 

But 'Source Location' is only available at 9AMALA Aggregates. I need this source location for my Bex Report.

 

So i have to use only 9AMALA Aggregate.

 

Please suggest what could be the issue.

 

Thanx.

DET_LEVEL Macro on Two Characteristics (DP)

$
0
0

Hi all,

 

In Demand Planning I have a macro running successfully saying that unless the material number is at detail level, the specific key figure is locked.

 

This macro is as below:

 

IF

 

DET_LEVEL ( Material_No ) = 0

ROW: XYZ (Attributes) =

Row Input (0)

 

ELSE

ROW: XYZ (Attributes) =

Row Input (1)

 

 

ENDIF

 

this works fine, and the row XYZ is only open for editing when the DP planning book is drilled down to the material number detail (lowest level)

 

But I want to enhance this, and its not working.. I am trying to say that TWO characteristics need to be in detail.. not just Material_No

 

IF

DET_LEVEL ( Material_No ) = 0 AND DET_Level ( Location ) = 0

ROW: XYZ (Attributes) =

Row Input (0)

 

ELSE

ROW XYZ (Attributes) =

Row Input (1)

 

But it seems to be totally ignoring the extra part added to check that Location is also at detail.. What am I doing wrong?

Retain Keyfig values at aggregated level

$
0
0

Hello,

 

I use Fix_calc macro to fix my keyfig value at aggregated level. But in detailed level when user changes value to 0 for all the locations

then aggregated value also becomes zero for that keyfig.

 

Fixing does not work for this case.

 

Please suggest.

 

Thanx!

Changes in current month in APO DP

$
0
0

Hello,

 

I am new in my position as a Demand Planner and to APO, I'm trying to understand if I can make changes to the current month FC for a part due to an impact order which is more than a years worth of my forecast. If I'm able to make changes, what is the best way to add this forecast in APO? There has to be a way, all I keep getting here is a no and that doesn't seem right.

 

Please advise when anyone gets a chance.

BADI /SAPAPO/AM_ALERTLIST - How to fill values in new field catalogue

$
0
0

Hi,

 

I need some help for passing values into the field Catalog of an ALERT Monitor.

 

The requirement is to add new fields in the ALERT Monitor and then populate them with values form the PRODUCT view.

 

I have implemented method MODIFY_ALERTLIST of BADI /SAPAPO/AM_ALERTLIST. I am able to add the new columns but I am unable to add the values. Actually while debugging i found that even though the NEW values are going into the table T_ALERTS, but the space between the New Added values and the original value is HUGE. Therefore when the Field Catalog is displayed in the Alert Monitor, the NEW Values are not shown.

 

I am attaching my Code

 

  DATA: l_table_ref TYPE REF TO data,

  l_table_ref_1 TYPE REF TO data,

  l_fieldcat_str TYPE /sapapo/am_aot_fieldcat_str,

  ls_fieldcat TYPE LINE OF lvc_t_fcat,

  ls_t_fieldcat LIKE LINE OF t_fieldcat,

  l_alert_str TYPE LINE OF /sapapo/alert_tab,

  l_str_ref TYPE REF TO data,

  l_str_ref_1 TYPE REF TO data.

 

  FIELD-SYMBOLS: <aot_tab> TYPE STANDARD TABLE,

  <aot_tab_1> TYPE STANDARD TABLE,

  <alert_str> TYPE /sapapo/alert_str,

  <aot_str> TYPE ANY,

  <alert_str1> TYPE c,

  <alert_str_uc> TYPE c.

 

  FIELD-SYMBOLS: <zat103> TYPE c. "ANY.

 

  DATA : l_col_pos TYPE i,

  gv_entries TYPE i,

  xlength TYPE i.

 

  FIELD-SYMBOLS : <info> TYPE ANY,

                  <aot_str1> TYPE ANY.

 

  DATA olen1 TYPE i.

 

  DATA: t_pegid TYPE STANDARD TABLE OF /sapapo/amopegid_tab,

        t_ordid TYPE STANDARD TABLE OF /sapapo/amoordid_tab.

 

  CLEAR: l_alert_str,

    l_table_ref ,

    l_table_ref_1 ,

    l_fieldcat_str ,

    ls_fieldcat ,

    ls_t_fieldcat ,

    l_str_ref  .

  .

 

*Add new column

  READ TABLE t_fieldcat INTO ls_t_fieldcat INDEX 1.

 

  DATA: x1 TYPE lvc_t_fcat,

       y1 LIKE LINE OF x1.

 

  x1 = ls_t_fieldcat-fieldcat.

 

  LOOP AT x1 INTO y1 WHERE reptext NE space.

 

    CHECK y1-fieldname NE 'DELIVERY_DATE'.

    xlength = xlength + y1-intlen.

 

  ENDLOOP.

 

  DESCRIBE TABLE  x1 LINES gv_entries.

 

  • Appending Delivery Date

  ls_fieldcat-col_pos = gv_entries + 1.

  ls_fieldcat-fieldname = 'DELIVERY_DATE'.

  ls_fieldcat-ifieldname = 'DELIVERY_DATE'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Delivery Date'.

  ls_fieldcat-outputlen = '10'.

  • ls_fieldcat-rollname = '/SAPAPO/DELIVERY_DATE' . "'DATS'.

 

  ls_fieldcat-domname = '/SAPAPO/CHAR20'."'/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Delivery Date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending Start Date

  ls_fieldcat-col_pos = gv_entries + 2.

  ls_fieldcat-fieldname = 'STARTDAT'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Start Date'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Start Date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

*

  • Appending Required Shelf Life Date

  ls_fieldcat-col_pos = gv_entries + 3.

  ls_fieldcat-fieldname = 'SL_MIN_DAT'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Req.SL dte'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Req.SL dte'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending Shelf Life Date/Required Maximum Shelf life Date

  ls_fieldcat-col_pos = gv_entries + 4.

  ls_fieldcat-fieldname = 'SL_MAX_DAT'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'SL Date 2'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'SL Date 2'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending (Availability/Requirements) Date of a Schedule Line

 

  ls_fieldcat-col_pos = gv_entries + 5.

  ls_fieldcat-fieldname = 'AVL_REQ_DATE'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Schedule Date'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Schedule Date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending Req Date/ Shipment end date

 

  ls_fieldcat-col_pos = gv_entries + 6.

  ls_fieldcat-fieldname = 'SHIP_MAX_DATE'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Req Date/ Shipment end date'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Req Date/ Shipment end date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending Expected Grading Date

 

  ls_fieldcat-col_pos = gv_entries + 7.

  ls_fieldcat-fieldname = 'GRAD_DATE'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Expected Grading Date'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Expected Grading Date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  • Appending Available Date

 

  ls_fieldcat-col_pos = gv_entries + 8.

  ls_fieldcat-fieldname = 'AVAIL_DATE'.

  ls_fieldcat-tabname = '1'.

  ls_fieldcat-seltext = 'Available Date'.

  ls_fieldcat-outputlen = '10'.

  ls_fieldcat-rollname = 'DATS'.

  ls_fieldcat-domname = '/SAPAPO/DATUM'.

  ls_fieldcat-coltext = 'Available Date'.

 

  APPEND ls_fieldcat TO ls_t_fieldcat-fieldcat.

 

  MODIFY TABLE t_fieldcat FROM ls_t_fieldcat.

 

  DATA lvc_t_fcat TYPE lvc_t_fcat.

 

*CODE FOR ADDING THE NEW VALUES*

************************************************************************

  • ASSIGN Alert Structure to Field Symbols for Unicode

 

  ASSIGN COMPONENT 0 OF STRUCTURE l_alert_str

                     TO            <alert_str>           CASTING.

  CALL METHOD cl_alv_table_create=>create_dynamic_table

    EXPORTING

      it_fieldcatalog = ls_t_fieldcat-fieldcat

    IMPORTING

      ep_table        = l_table_ref.

 

*assign dynamic structure

  ASSIGN l_table_ref->* TO <aot_tab>.

  CREATE DATA l_str_ref LIKE LINE OF <aot_tab>.

  ASSIGN l_str_ref->* TO <aot_str>.

  ASSIGN l_str_ref->* TO <alert_str_uc> CASTING.

 

  LOOP AT t_alerts INTO l_alert_str.

 

  •    READ TABLE t_fieldcat WITH KEY aot = l_alert_str-aot

  •    INTO l_fieldcat_str.

*

  •    CALL FUNCTION '/SAPAPO/ATAB_FIELDCAT_GET'

  •      EXPORTING

  •        aot        = l_fieldcat_str-aot

  •        mview      = l_fieldcat_str-mview

  •      IMPORTING

  •        table_ref  = l_table_ref

  •        t_fieldcat = lvc_t_fcat.

 

 

    ASSIGN l_alert_str TO <alert_str>.

 

*copy alert to aot-specific structure

 

    MOVE <alert_str>-info TO <alert_str_uc>.

 

*Write this code inside the loop

    ASSIGN COMPONENT 'DELIVERY_DATE' OF STRUCTURE <aot_str> TO <zat103>.  "CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'STARTDAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'SL_MIN_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'SL_MAX_DAT' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'AVL_REQ_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'SHIP_MAX_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'GRAD_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

    ASSIGN COMPONENT 'AVAIL_DATE' OF STRUCTURE <aot_str> TO <zat103> CASTING.

    IF sy-subrc = 0.

      CLEAR <zat103>.

*Fetch ur own custom value and move to the field symbol. This

*dynamically populates ur structure.

      <zat103> = '22.11.1999'.

    ENDIF.

 

    MOVE <alert_str_uc> TO <alert_str>-info.

    MODIFY t_alerts FROM l_alert_str INDEX sy-tabix.

    CLEAR : <alert_str>, <alert_str_uc>.

 

  ENDLOOP.

 

I have even tried Concatenating Values,  with that method even though the NEW Values are available but they do not fall under the correct Column.

 

PLEASE help me out cos I am really Stuck.

 

Regards

Abhishek Sahi

DP Macro Help: Value Validation

$
0
0

Hi,

 

I need assistance in the macro operators and logic to write a DP macro that validates a key figure value follows these rules:

 

Numeric only

6 numbers long

First two digits must always be: 20

 

 

I'm guessing there are standard things to check each of these?

 

 

Thanks in advance..

:/SAPAPO/CULL1:819

$
0
0

While editing a process order, the order is saved in ECC but it is not updated from APO because it remains stuck in /SAPAPO/CQ with below error. What is this error exactly and how to resolve it?

 

:/SAPAPO/CULL1:819

 

CQ error1.png

 

When I display the queue it gives some table data but I don't understand it.

 

CQ error2.png


Error Reading Planning Area

$
0
0

Hello Gurus,

 

While executing a macro via an activity on a background job, the job is cancelled with an error message Error Reading Planning Area. Macro is calculating certain Key figure

We then run Consistency Check for planning area but no inconsistency and errors were found. We also check the macro and it is on GREEN LIGHT status. We reexecute but it still fails.

 

Kindly help on how to go abaout this error as we need this macro working.

 

This job with the macro is working for quite a long time and it is the first time it fails and encountered the said error.

 

Any help will be gladly appreciated.

 

Thanks in advance,

Raymond

Not able to create Delivery in ECC for STO's

$
0
0

Hi All,

 

We have a situation here wherein the Sending locations are mapped in APO system. There are a lot of receiving locations that are not planning relevant hence they are not required to be available in APO.

 

We are not able to create deliveries if the receiving plant is not available in APO.

 

Can somebody suggest some workaround for this situation?

 

Regards,

Ujjal

Reorder point planning in apo

$
0
0

Dear Experts

 

I am planning consumption based plan in sapapo .

 

My finished material is having 2 level BOM . I have maintained Mrp type as x0 Lot size as EX  and reorder point for 2000 ,consumption mode 2 Backward consumption 10 Forward consumption 99 in mrp3 and I have cifed material to APO changes have been replicated in APO

 

When I am running planning heuristics sap-PP-007 .Planned order are not getting generated in correct order multiple planned order are getting generated .

And also charcterstics are missing while generating planned order like width length colour etc

 

How to overcome it ??

 

Regards

Virender

Time axis scale Detailed Scheduling planning board

$
0
0

Hi,

 

Actually, in the Detailed scheduling planning board I see only two time scales by chart. I think that is possible to show three time scales but I don't know how can I achieve it.

Please, ¿can you help me?

 

DS planning board.png

 

Thanks.

initial assignment of resource

$
0
0

Dear  Expert

 

For my Finished material  i have assigned 75 resources where my finished material can manufactured on one of the resource depending on the availability .

 

In that 75 resources one of my resource is XYZ for which i have assigned planning ID so that when ever my planned orders generates My finished material should pick these XYZ resource initially  .But in my case it is not happening

 

Any thing I am Missing . please suggest

 

Regards

Virender

 

Message was edited by: virender sehwag

Product Interchangeability

$
0
0

Hi All

 

I have a client requirement related to product Interchangeability which goes like this:

 

In the scenario for fully interchangeable products

A <-> B <-> C

 

If we have a forecast for A, and there is no stock for A. The system will look for stock of B, then C.

If enough stock is not available, then the system creates a Stock Transfer Requisition for C.

Now, my requirement is to create an STR for A ( the original material) instead of C.

 

Please provide your suggestions on how we can achieve this functionality.

 

Thanks and regards

Swati

Using Business Graphics instead of Chart Engine in 'Forecast in Interactive Planning'

$
0
0

We like the SAP Business Graphics more than the Chart-Engine. Therefore we use it in both interactive planning data view (user parameter /SAPAPO/SDP_CHART_V = CHART) and the interactive forecasting (user parameter /SAPAPO/FCST_CHART = CHART).

 

The issue we have is that we do not see the ability to save any changes we make to the graph layout while in this view.  We see the Menu Option Edit->Graphic Setting but this does not give the ability to save changes such as line color, scale etc.

 

If we revert back to Chart Engine we get a 'Save Graphic Setting' button but it is not there when using Business Graphics.  This is very frustrating for our users that they have to re apply all of their settings each time we use it.

 

Why would this ability be available in Interactive Planning but not in 'Forecast in Interactive Planning'>

 

 

Any help would be greatly appreciated.

 

Thanks

Adam


fictious dates in orders

$
0
0

Hi experts,

 

while taking my STR's  into APO instead of  emerging with the same date it comes with a new date (fictious date) ,In essence it is rescheduling my orders without asking for ? .How would I stop this ,rescheduling ?

 

your expert's idea would be a balm to my pain  .

 

Thanks

Ohio

How to Transfer Stock Quantity from SNP to Demand as Time Series KF

$
0
0

Dear All,

I need to Transfer the Unrestricted Stock Quantity (stock Type CC)  from SNP to Demand Planning as a time series KF

what type of KF to be defined in Demand Planning and what is the process,

I tried the Trx.  /SAPAPO/LCOUT Release to demand planning but it does not work.

Thanks for Help

Process Chain Job Scheduling and Release issue

$
0
0

Hi All,

 

I have a Process chain, The Start condition of which has an event(Event triggered chain).

Everyday the chain executes, job "BI_PROCESS_TRIGGER" gets released.

 

I don't want the job "BI_PROCESS_TRIGGER" at all, as I already have a job "PA11EUSNPDEPOPT" which starts my chain as shown in screenshot below.

 

bi_process trigger.JPG

Can anyone please help with- how to remove the job BI_PROCESS_TRIGGER permanently.

Its getting released automatically after process chain execution.

 

Note: I tried deleting the job after it gets released, but in vain.It gets released as soon as Process chain (Start step)completes.

 

Thanks for the help!

what is master data in sap apo spp? how to run order forecast?

CIF' ing selectively. Do i have a choice ?

$
0
0

Hi experts,

 

while running SNP optimizer first i clean it up with RLCDEL ,after that I only wanted the master data to stop flowing in.

but i want the transactional data to keep flowing,I do not want to stop the transactional data

 

I have not so far come across any screen or check box that gives me a choice ,but there should some coding available

can you please suggest any work around ?

 

Thanks

Ohio

Viewing all 2068 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>