APO DP - use of BADI /sapapo/sdp_fcst4
I am wanting to use BADI /sapapo/sdp_fcst4 to store forecast errors in mass processing.
My question is:
How do I see/use these stored forecast errors when I am working in interactive DP.
Thanks,
Bob Austin, Atos Origin
Dear Bob
I suggest you to check this document: to extract the forecasting results from SAP APO
I also suggest you to look at this [thread: APO DP - BADI for storing forecast error in mass processing.|;
Best regards,
Carlos Eduardo Rodríguez
Similar Messages
-
Use of BADI /SAPAPO/SDP_RELDATA METHOD CHANGE_PROD_LOC
We have a requirement for a small number of product/locations to re-direct them onto a customer location when releasing the forecasts to SNP.
We have been pointed in the direction of the BADI /SAPAPO/SDP_RELDATA method CHANGE_PROD_LOC.
Unfortunately we can not find any documentation on the use of this BADI/Method, we've tried to change the location using the parameter CT_MATID_LOCID, also setting the parameter CV_CHANGE_PROD_LOC where a change has been made, but it doesn't seem to work.
Has anyone used this BADI/Method and has advice on it's usage?
Regards, MarkHi Mark - Changing the CT_MATID_LOCID table alone will not associate the change with a plobj or CV. I am surprised you do not get an error. You will also need to update the CT_MATLOC_PLOBJ table - find the entry for the old matid/locid then update that with the new matid/locid. Also the CT_PLOBJ_CHAR table needs to be updated as well - find the same plobj and update matid/locid accordingly.
Regards
Andy -
Badi /SAPAPO/SDP_SELECTOR.
Hi Techies ,
I need to add some extra selection fields in the selection window using this badi /SAPAPO/SDP_SELECTOR,and the method used for the selection is F4 .
Now kindly let me know how to implement this standard badi so that i can do my custom changes to the method .
In addition to the standard fields available in selection profile, we add these fields for selection in the planning book.
Implement the definition /SAPAPO/SDP_SELECTOR. Method F4 is triggered when the user clicks on the value help for the additional fields. Method INIT_OBJECT_LIST is triggered when the planning book is loaded using the transaction /SAPAPO/SDP94. Method LOC_PROD_VALUE_LIST is triggered when the user enters the selection criteria in the selection profile and hits ENTER.
Now let me know how to proceed with this modification using this BADI , swift responses would be really appreciated !!
Thanks,
PKP.Hi PKP,
Its not very clear what issue you are facing.
You need to use the method INIT_OBJECT_LIST if you want to add more selection criteria to the shuffler than the ones available in standard. You can use the method ADD_FIELD_TO_SELECTOR within INIT_OBJECT_LIST to add the new selection criteria.
By default, you won't see any F4 help against these newly added selection criteria. If you want to add the same, you would need to add code in F4.
Thanks - Pawan -
BADI /SAPAPO/SDP_SAVE
Hi Experts,
Please explain me how to use the BADI
/SAPAPO/SDP_SAVE.
I need to work on the method SAVE_CHECK.
What values will be given to the import parameters IV_PAREAID, IS_WRITE_OPTIONS, IT_SELECTION, IT_PLOB_VALUES and IT_COLS.
And would be the values returned to CT_LINES and CT_TAB.
Thanks and would appreciate your help.
Regards
SriniHi Visu,
Thank you very much for the detailed reply.
I am working as you suggested. I will update the result.
Actually the pseudo code given to me is:
BADI name /SAPAPO/SDP_SAVE
Method name SAVE_CHECK
Parameters:
IV_PAREAID Importing (planning area for the source / target
IS_WRITE_OPTIONS Importing
IT_SELECTION Importing (looks like this an infoobject so relevant KF)
IT_PLOB_VALUES Importing
IT_COLS Importing
CT_LINES Changing
CT_TAB Changing
Can we use this BADI for the same requirement?
Please explain.
Thanks and would appreciate your help.
Regards
Srini -
BAdi /SAPAPO/SDP_DISTR
Hello,
Did anybody used the BAdi /SAPAPO/SDP_DISTR? Can this be used for defining custom fair share rules in Deployment.
Please let me know if anybody has used this before and has some insights into this.
ThanksHi
I have used BADI /SAPAPO/FS_USER insted of the /SAPAPO/SDP_DISTR for user defined fairshare distribution.
Regards,
Raghu. -
Use of APO BADI /SAPAPO/SNP_ADV_SFT
I am using APO SNP safety stock planning.
I want to store the calculated 'demand forecast error' from the safety stock program on a field on the APO product master.
Is the BADI /SAPAPO/SNP_ADV_SFT suitable for this (method GET_FORECAST_ERROR)?
Or is there a better approach?
Thanks for any advice on this...Is these products are unique? If yes, then you can use Location split functionality.
-
APO DP Using BAdI SDP_SELECTOR
Hi experts,
I am trying to use BAdI /SAPAPO/SDP_SELECTOR but I can not get any method of it to stop at a breakpoint.
What I want to implement: By opening a planning book and loading a specific selection profile, some fields in selection shuffler have to be grayed out or become invisible at all. I thought this BAdI could be used for this, but after many attempts I have to give up and ask experts for advise.
Kind regards
AbanHi Aban - the method INIT_OBJECT_LIST is called when you load a planning book either by first entering SDP94 or changing planning book while in SDP94. This method allows you to manipoulate what fields will apear as selections depending on the object selected - you can grey out the left side by making a field required but not the values on the right side of the selection. None of the methods are called when creating changing or saving selection profiles - the other methods are called for F4 or after selection is chosen to filter the selected data or to add fields to the selected data ALV. If you want to grey out the values in a selection then you may want to create an enhancement implementation to do so. It sounds like there may be other options to limit what users are doing such as authorization or filtering the selection using the above BADI. Also you may be able to set up profiles users can select that have prepopulated values then train or require users to choose those profiles and add additional criteria.
Andy -
Hide row in planning book using BADI /SAPAPO/ADVX USER_EXIT_MACRO
Dear All,
I would like to have your suggestion how to hide row in planning book using BADI USER_EXIT_MACRO
the requirement is when I drill down the object by region, the first line will be "total" and the second and third line
will be region like "north" and "south".
I want to show only "total" line and hide region detail.
Would it be possible to do this using the badi USER_EXIT_MACRO?
Thank you in advance,
BoonsomHi,
In the Interactive Planning, you see a Cap-like icon on the top-left...... click on it and choose the characteristic (say, region) and say ok. You will then be able to see the Region just on top of the planning table. When you load the data, by default, it will have "Total" as option, and with your wish, you can choose to see the data for a particular region (North, South etc).
Regards,
Guru Charan. -
Dear All,
I have done enhancement in the ERP system by adding the customer specific field ZZ_RESWK in structure CIFPUORCUS. This field is filled in the ERP user exit EXIT_SAPLMEAP_001, for the Purchase order (category BF & BG) and PO Memo (Category AH).
Now, in APO I have implemented the BAdI /sapapo/dm_po_mntn, and in the method "Change" I am passing the field zz_reswk to ct_ordkey table field reswk, so to write the field in livecache.
This set up is working for order category BF and BG. However, when I am transferring the PO memo (Category AH) from ERP to APO, the the BAdI internal table ct_ordkey is having no records. Hence I am not able to write field reswk for the PO memo in the live cache.
Any one have any idea, why there is not data in ct_ordkey for PO memo ?
Note: The data transfer from ERP to APO is using IDOC.
Please Help.
Regards,
SCHi,
If you don't do what I told you, I can not do anything more....
Your code should look like this:
loop at it_item into ls_item.
ls_cust-refobject = 'POITEM'.
ls_cust-fieldname = 'CATALOGID'.
ls_cust-REFFIELD1 = 'PO_ITEM'. <b>and not 'POITEM'</b>
ls_cust-REFVAL1 = ls_item-number_int. <b>and not a fixed value</b>
ls_cust-container = ls_item-catalogid.
append ls_cust to ct_bapi_customer_fields.
endloop.
For R/3 mapping table BBP_CUFMAP:
DOC_TYPE = PO
KEY_TYPE = Z
CUF_FIELD = CATALOGID
R3_FIELD = ZSRMCATALOGID
Rgds
Christophe -
APO DP - use of parallelisation profiles
I am using APO DP V5.
Has anyone any experience of using parallelisation profiles (/sapapo/sdp_par) to speed up job processing times?
What is the recommended number of parallel processes?
Thanks,
Bob Austin, Atos OriginYes we have used it in our projects for improvement of processing time..
Depend on the data volume of each applications, we have maintaied the block size
Parallele processing is always useful for the huge data to be process in Background.
To improve the performance of such background jobs it is often advisable to run these jobs in several parallel processes
By using parallel processing you no longer have to split jobs into smaller units
Parallele Processing Profile Attributes:
If you see in the Process field max you can maintain 9999
Block Location Product :If you do not specify a block size, the program uses a block size of 20,000 as the default value.
e.g. of block size
You want to copy 13,000 location products and have chosen a block size of 5,000. The program starts three parallel work processes. 5,000 location products are copied in the first and second work processes, and 3,000 are copied in the third.
Block Size Peging area:
If you do not specify a block size, the program uses a block size of 10,000 pegging areas as the default value.
e.g.: You want to copy 13,000 pegging areas and have chosen a block size of 5,000. The program starts three parallel work processes. 5,000 pegging areas are copied in the first and second work processes, and 3,000 are copied in the third.
Block Size Orders:If you do not specify a block size, the system uses a block size of 500 orders as the default value.
Block Size Stock:If you do not specify a block size, the program uses a block size of 1000 stocks as the default value.
No Order Serialization:When orders are copied in parallel, serialization effects can occur in liveCache due to locks. This means that order posting can be executed one after another in liveCache due to locks, although the program has started the work processes in parallel.
If you set this indicator, serialization of orders does not occur, but the orders are actually processed in parallel. You can thereby improve performance when copying orders.
Block size : The number of elements processed in one process. The data objects that correspond to these elements differ from application to application
Maximum number of parallel processes :
Since one process is required for control purposes, the smallest entry in this field that results in performance improvements is 3.
You can assign a server group to the profile so that the system only uses particular servers parallel processing. Other servers can then be reserved for users working online. You cannot create these server groups yourself; contact your system administration if you require new groups.
You can also define the block size. There are minimum and maximum value for each application in the system. If you make no entry, the system uses a default value that is defined for each application.
Note: It is advisable : Although it is technically possible, working with parallel processing with a dialog job(online execution) is not advisable. In this case the main process, which controls the parallel work processes, is a dialog process. For various technical reasons this can lead to a noticeable deterioration in performance. -
Implementation for BADI - /SAPAPO/ADVX
Hi,
I have created and activated an implementation for the BADI /SAPAPO/ADVX for the method USER_EXIT_MACRO. But this implementation is not triggering when i execute a macro in Transaction /SAPAPO/SDP94. Could you please let me know how to achieve this? (I am implementing this BADI to display the Units in SUOM instead of Base UOM).
Do we have any other BADI for changing the stock from UOM to SUOM?
Thanks,
RajinikanthHello Experts,
I have created one Z class in which i am using the methods of BADI /sapapo/advx , i have hard coded my macro id ,layout id and view id so that it will execute my code on execution of that particular macro.now my problem is how to read the data for particular keyfigure from the internal tables of this interface.i am not getting how to read te data and process it.
please help me on this.
Regards,
Saurabh Kulkarni -
Use of BADI for SNP capacity levelling
I am using APO V5.1.
I'm interested in using the Business Add in (BADI) for SNP capacity levelling.
Can anyone tell me which BADI this is, and the possible functionality it can provide?
Thanks for any information on this...To give you a couple of examples of what we use the BADi for:
1) Based on a product characteristic, the levelling will only level certain products. E.g. you could set a characteristic to mark products for internal use versus export use and then level the internal requirements first.
2) The levelling will only level planned production for highlighted orders in the data view.
Hope that helps for ideas
Regards
Ian -
Create CVC using Standard Function /SAPAPO/TS_PLOB_CREATE
Hello All,
please can you explain me in detail how the Function /SAPAPO/TS_PLOB_CREATE work to create the CVC.
we have a custom program that use this function to create the CVC for Italy Project, we have copied this program to use it for a roll out project in brasile, my client is asked me for the new project brasile should we create new tables?
my interest is to now if this function need a custom table to work? or we can use it in various program without needing different
tables?
if we use this function on the same system to create CVC for different area Italy/brasile will we have some problem on the data?
for our brasile project we have created new custom master data tables.
thanks for All
BilalHi Bilal ,
Function /SAPAPO/TS_PLOB_CREATE - Create Single characteristic combination, is nothing but a program called internally in standard TCode: /sapapo/mc62 for CVC creation. This function is used specifically when you want to create single CVC based on the individually/interactively entered characteristics combination.
Whereas there is a similar function /SAPAPO/TS_PLOB_MAINTAIN-Create Characteristic combinations (again a part of standard TCode/SAPAPO/MC62 called internally) which is used for multiple CVC creation based on the characteristic data either from MPOS, Info provider, external file or BAdI.
As understand from your requirement that you want to roll out the CVC creation process based on the table entries, we have similar setup in which we have following process which is working very fine u2026
-We have created a Z Table where the new characteristic combinations are entered globally -for all four regions
-Based on entries in that Z table as a data source we have built a Info provider(Cube) and then
-This Info provider is used in function /SAPAPO/TS_PLOB_MAINTAIN (as a part of scheduled jobs running with some frequency) to create multiple CVC combinations across regions.
Hope this helps youu2026
Regards,
Digambar -
BADI /SAPAPO/SDP_FCSTAUTH
Hi!
I would like to restrict the forecast profile list that the user see when he run an univariate forecast manually in SDP94. For example, for version 000, only profiles witch start with 'ACT' should appear.
I found note Note 394076 (Consulting: USER-EXITS and BAdIs in the forecast environment) and badi /SAPAPO/SDP_FCSTAUTH. I created an implementation in se19. I put a break-point in method AUTH_CHECK1 but the program doesn't stop when i run a forecast manually.
Maybe there are others solutions.
Can you give me some help please?Dear Guest,
From SAP Note 394076 - Consulting: USER-EXITS and BAdIs in the forecast environment
BAdI /SAPAPO/SDP_FCSTAUTH: (as of SCM 4.0)
BAdI for special authorization checks in the forecast enfironment.
For example you can define naming conventions for LIKE profiles or other objects in the forecast.
I think this BAdI is related to Like Modeling, you should look for an authorization object instead of a BAdI.
Please Take a Look at [SAP Note 400434 - Authorizations in APO demand planning|https://service.sap.com/sap/support/notes/400434]
Best regards,
Carlos R. -
BADI /SAPAPO/AM_ALERTLIST - How to fill values in new field catalogue
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 SahiHi,
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
Maybe you are looking for
-
Applet works in Netscape but not IE
Very basic Hello World applet. IT doesn't work in IE 6. Not sure why. html source: <html> <body> <applet code="test.class" Width=640 Height=480></applet> </body> </html> Anyone know why?
-
What is the latest Patch level?
Dear All, Software component Release Level SAP_HR 604 0069 EA-HR 606 0021 EA-HRGXX 606 0021 EA-HRRXX
-
How to find missing unread message in mac mail
Hello, I have one unread message that I can not find, it is perhaps one of the mailchains I have. I organized my folder sort by unread and I can not find it neither. Please advise me how to find it. Thank you, Diana
-
Mount.nfs: access denied
Hi, I've been trying the very basic NFS configuration, using ArchWiki. /etc/hosts, client side: # /etc/hosts: static lookup table for host names #<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 rimfirebox localhost.localdomain
-
Screen freezes while playing video
Anybody find a fix from apple that solves problem.?