2012 Feb 22 12:25 PM
i am new to SRM and badi ,
my requirement is as below ,
1 Read the shopping cart items and Run all items:
2. We need to populate an error message if the SC has line items of different types
3. We have the header data in ls_header based on which we will get the Shopping Cart data via FM u201CBBP_PROCDOC_GETDETAILu201D.
4 Then looping through item data we will process our logic to check if the SC line items are of same type or not.
5 . If the line items are of different type, we need to populate the error message u201CThe item &1 has the same type a
s item &2u201D
i am using badi BBP_DOC_CHECK_BADI for this and function module BBP_PROCDOC_GETDETAIL as below ,
CALL FUNCTION BBP_PROCDOC_GETDETAIL
EXPORTING
i_guid = iv_doc_guid
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_account = lt_account
e_limit = lt_limit
e_partner = lt_partner
e_orgdata = lt_orgdata
e_messages = lt_in_messages
The item data then exists in lt_item (incl. process- IDs of the items), using which it can be iterated with the LOOP command:
LOOP AT lt_item INTO ls_item WHERE del_ind EQ space.
how to code here
ENDLOOP.
Moderator message: once again, only one open thread per issue is allowed, stop posting duplicates, furthermore this is considered "spec dumping", please do some research of your own first.
Edited by: Thomas Zloch on Feb 22, 2012
i am new to SRM and badi ,
my requirement is as below ,
1 Read the shopping cart items and Run all items:
2. We need to populate an error message if the SC has line items of different types
3. We have the header data in ls_header based on which we will get the Shopping Cart data via FM u201CBBP_PROCDOC_GETDETAILu201D.
4 Then looping through item data we will process our logic to check if the SC line items are of same type or not.
5 . If the line items are of different type, we need to populate the error message u201CThe item &1 has the same type a
s item &2u201D
i am using badi BBP_DOC_CHECK_BADI for this and function module BBP_PROCDOC_GETDETAIL as below ,
CALL FUNCTION BBP_PROCDOC_GETDETAIL
EXPORTING
i_guid = iv_doc_guid
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_account = lt_account
e_limit = lt_limit
e_partner = lt_partner
e_orgdata = lt_orgdata
e_messages = lt_in_messages
The item data then exists in lt_item (incl. process- IDs of the items), using which it can be iterated with the LOOP command:
LOOP AT lt_item INTO ls_item WHERE del_ind EQ space.
how to code here
ENDLOOP.
Moderator message: once again, only one open thread per issue is allowed, stop posting duplicates, furthermore this is considered "spec dumping", please do some research of your own first.
Edited by: Thomas Zloch on Feb 22, 2012
2012 Feb 22 12:27 PM
in my tech spec it is mentioned as below ,
1 Read the shopping cart items and run all items:
2 Determine and note the product categories-ID and process-ID (using item data, process-ID is a customer field, see CD 2553_E_1_procurement_010 for process-ID) of an item in an internal table.
3 If 1st item: continue, otherwise: check, whether same product category and process-ID are noted already. If no: is the combination of WGR_ID_ADD and PROCID_ADD as per table ZSRM_WGR_SORTEN is allowed: If no: Display an error message
and i have to create and use table as below ,
Field name Data type Length Key? Description
MANDT MANDT X Client
ORGID CHAR 10 X Organization-ID
PROCESSID CHAR 10 X Process-ID
WGRID CHAR 10 X Product categories-ID
WGRID_ADD CHAR 10 Additionally allowed product categories -ID
PROCID_ADD CHAR 10 Additionally allowed process-ID
how to code according to above 2 and 3 steps within loop and endloop
please help.
Edited by: veerus on Feb 22, 2012 1:27 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |