cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get details of list of SC from list of PO & vice versa ?

Former Member
0 Kudos

Hello All,

Can Please anyone tell me how to get the list of Shopping Carts from the list of PO. I have list of Purchase orders numbers. Can you please suggest any standard table or combination of standard tables from which I can get this report ?

We have Stand alone system and do not have access to back end system.

Thank you in advance.

Digant

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello all,

I got the accurate method.. Not very hard and for those who don't have development knowledge.

Step1: Got to table BBP_PDBIE. Use PO numbers given to get Object (item level) GUID.

Step2: Passing that in CRMD_ORDERADM_I will provide Parent Object GUID.

Step3: Using Parent GUID in CRMD_ORDERADM_H SC numbers can be obtained.

So combination of the sheets would be reverse than the process, Basically drag the SC numbers from CRMD_ORDERADM_H to CRMD_ORDERADM_I to BBP_PDBEI.

All are table ..no programming would be required.

This is how I obtained it.. If any other method using tables as I don't know programming, please feel free to provide the same to us , here in the discussion.

Answers (2)

Answers (2)

former_member184741
Active Contributor
0 Kudos

you can use below code


TYPES: BEGIN OF ty_po_guid_sc_guid,

            po_guid TYPE swo_typeid,

            sc_guid TYPE swo_typeid,

          END OF ty_po_guid_sc_guid.


TYPES: BEGIN OF ty_sc_guid_sc_num,

            sc_guid TYPE guid,

            sc_num  TYPE crmt_object_id_db,

          END OF ty_sc_guid_sc_num.



DATA: lt_po_guid_sc_guid TYPE STANDARD TABLE OF ty_po_guid_sc_guid,

         ls_po_guid_sc_guid TYPE ty_po_guid_sc_guid,

         lt_sc_guid_sc_num  TYPE STANDARD TABLE OF ty_sc_guid_sc_num,

         ls_sc_guid_sc_num  TYPE ty_sc_guid_sc_num.


*Get the SC guid related to PO guid

SELECT a~objkey AS po_guid c~objkey AS sc_guid INTO TABLE lt_po_guid_sc_guid

              FROM srrelroles   AS a

              JOIN bbp_pdbinrel AS b ON a~roleid EQ b~role_b

              JOIN srrelroles   AS c ON b~role_a EQ c~roleid

              FOR ALL ENTRIES IN lt_po_guid_sc_guid

              WHERE a~objkey EQ lt_po_guid_sc_guid-po_guid.

       LOOP AT lt_po_guid_sc_guid INTO ls_po_guid_sc_guid.

         MOVE ls_po_guid_sc_guid-sc_guid TO ls_sc_guid_sc_num-sc_guid.

         APPEND ls_sc_guid_sc_num TO lt_sc_guid_sc_num.

       ENDLOOP.

       IF lt_sc_guid_sc_num[] IS NOT INITIAL.

* Get the shopping cart number

         SELECT a~guid AS sc_guid b~object_id AS sc_num INTO TABLE lt_sc_guid_sc_num

         FROM crmd_orderadm_i AS a

          JOIN crmd_orderadm_h AS b ON a~header EQ b~guid

              FOR ALL ENTRIES IN lt_sc_guid_sc_num

              WHERE a~guid = lt_sc_guid_sc_num-sc_guid

                  AND b~object_type = 'BUS2121'.

       ENDIF.


<removed>

Please do not ask for points. Message was edited by: Zoltan Keller

mithun_kukke
Explorer
0 Kudos

Hi Digant,

The Purchase order info is usually residing in the SC Header and Item Links under in Tcode BBP_PD. You may have to build a custom report to link the tables together and get to the SC number.

Another place where you can find this info is in table BBP_PDBEI but that depends on what backend document you are creating. Here you can link the tables directly in SQVI by using the GUID's

Regards

Mithun