BBP_PD_PO_GETDETAIL and item relationship issue

Hi all,
I'm working on a a requirement that deals with the distribution phase from SRM of a purchase order.
What I have to do is basically intercept the order, extract its items and the itmlim_rel table in order to get an historical tracking for each position, so that I can "browse" from a certain position of the PO to the corrisponding position of the shopping cart which generated it. This to perform some checks on accounting details wrt the ones retrieved for the corresponding SC items.
Here's a snippet of code (from a custom implementation of the method BBP_B46B_PO_OUTBOUND:
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
      EXPORTING
        i_guid       = is_header-guid
      TABLES
        e_item       = t_po_item
        e_itmlim_rel = t_po_itmlim_rel.
    READ TABLE t_po_item INTO l_po_item WITH KEY del_ind = ''.
    IF sy-subrc = 0.
      READ TABLE t_po_itmlim_rel
             INTO wa_po_itmlim_rel
             WITH KEY objtype_b = 'BUS2201001'
                      itm_guid_b = l_po_item-guid
                      objtype_a = 'BUS2121001'.     " from PO pos to SC pos
The last READ TABLE ends with sy-subrc = 4, and here's the point. The GUIDs on the relationship table do NOT match the ones on the t_po_item table. How is that possible? There's something I'm missing, hope you gurus can provide me a suggestion or hint

Hi,
Actually,Data is coming in E_Item and PO is getting created  if I comment the code which i have written in BBP_DOC_CHANGE_BADI.As i told you earlier that I am using BBP_DOC_CHANGE_BADI only for value setting in my Custom fields of SRM Portal 7.0.If I uncomment that BADI again I am not getting data in E_Item..I am missing anything in this BADI.
Cann you please check.
I'll give the complete code:
Code in BADI:BBPDOC_CHANGE_BADI._
method IF_EX_BBP_DOC_CHANGE_BADI~BBP_PO_CHANGE.
Checking mode of Purchase Order
    IF  iv_mode EQ gc_c OR   " Create
       iv_mode EQ gc_u OR   " Update
       iv_mode EQ gc_t.     " Check
   ES_HEADER-ZZ_LOGIC = 'X'.
    ES_HEADER-ZZ_LOGIC_DAT = SY-DATUM.
ENDIF.
Code in BADI:BBP_DOC_CHECK BADI
Data : gs_header        TYPE BBP_PDS_PO_HEADER_D,     " PO Header Data
           gt_item          TYPE standard table of  BBP_PDS_PO_ITEM_D,       " Item Data for PO
           gs_item          LIKE LINE OF gt_item,    " Item Data for PO
Checking mode of Purchase Order
    IF iv_mode EQ gc_c OR   " Create
       iv_mode EQ gc_u OR   " Update
       iv_mode EQ gc_t.     " Check
if not iv_doc_guid is initial.
Fetch PO Details
      CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
        EXPORTING
          I_GUID          = iv_doc_guid
          I_WITH_ITEMDATA = gc_x
        IMPORTING
          E_HEADER        = gs_header
        TABLES
          E_ITEM          = gt_item.

Similar Messages

  • Sales Header and Item integration issues.

    Experts,
    If I integrate 2LIS_11_VAHDR and 2LIS_11_VAITM into an ODS:
    Issues:
    1) If I make my SO # as a Key Field: then I cannot capture all my item level details since they will be overwritten as the key is just SO #.
    2) If i make both SO # and SO Item # as key fields: I can capture all my item details with out any problem since VAITM will have both SO # and SO Item # but how do I capture specifically header details as header DS does not have SO Item   #
    Please help me out
    thanks

    Hi Hari,
    Can u be more specific on your requirement so that we can help u..?
    Mahendra

  • Issues with the Delivering Country details in the Delivery hdr and item

    Hi Group,
    I am facing issues while trying to get the Delivering country details automatically at both the Delivery header and item levels.
    All the necessary configuration have been done as such the Delivering country field is fetching incorrect data, even though in the table 'T001W' it was mentioned regarding the Countries(Delivering country and Destination country).
    All the configuration seems to be fine.
    I tried to debug the standard tcode, but could not succeed till now regarding the resolution part.
    Please let me know if you have faced this kind of issue and how to go about resolving this issue.
    Regards,
    Vishnu.

    Hi,
    The Delivering Plant country is in Germany(DE) and Destination country is in the US(Los Angeles) but still I was getting a value for 'IT'(Italy), which was not at all expected....
    So please provide inputs on this to and let me know if you have any other queries also.
    Regards,
    Vishnu

  • ERLA/NORM, Header and Item Level Pricing Issue

    Dear All,
    I have an issue wherein, even though I have used ERLA for BoM Item and NORM for Subitems, in sales order Conditions, both header level and item level pricings are active.
    Correct me if I am wrong, item level pricing should get deactivated.
    Kindly let me know if there is any issue in the settings.
    The default item categories appearing in the sales document is TAQ for higher level item and TAE for subitems
    Thanks and Regards
    Adithya
    Edited by: Adi1976 on Feb 6, 2012 12:08 PM

    Item Category group for Subitems should be ERLA, not NORM.
    Sales Order
    - Item Cat Group
    - Higher I Cat
    - I Cat
    OR
    ERLA
    TAQ
    OR
    ERLA
    TAQ
    TAE
    Try & share feedback.
    Regards
    JP

  • Sum of the items issued and items received

    Sir,
    if i want to get all the sum of the items issued and items received wrt mblnr and matnr, what shd i do??
    thanks
    Arun

    Hi
        Look at this code .It retrieves the sum of LABST field for all line lineitems for a given material No in MARD table.
    TYPES : BEGIN OF Type_Mard,
    W_MATNR TYPE MARD-MATNR,
    W_LABST TYPE MARD-LABST,
    END OF Type_MARD.
    data : ITAB_MARD TYPE TABLE OF Type_MARD,
    wa_MARD TYPE Type_MARD.
    SELECT MATNR
    SUM( LABST) INTO TABLE ITAB_MARD
    FROM MARD WHERE MATNR = p_MATNR " parameters
    AND WERKS = P_RESWK .
    Hope youll get an idea
    Thanks
    Viquar Iqbal

  • Material and item category relationship

    For a given material, how can I get item category and higher level item category.
    I know mara stores item category group and t184 stores item category group and item category
    Thanks.

    Think you are going wrong way.
    Item Category and High Level Item Category are not assigned to Material, but they are assigned to Sales Document Type and Item Category Group. As you mentioned, you can get the details from table T184.
    Table T184 gives the options on how the system has to react in various scenarios.
    Combination of Sales Document Type in Sales Order, Item Category Group which is from Material Master and... result in the Item Category that is populated for the Item.
    Regards
    Eswar

  • Outbound file interface - Header and item record transfer issue

    Hi.
    Pls help me complete this work by today:
    I have to pass header and item record into file in application server.
    I am retrieving Header record from table MCHB & RESB
    and item record from MKOL & LFA1
    I have to create separate file per plant ( plant is multiple selection field)
    I have a check box (p_sob) for special stock selection in my selection screen .
    If p_sob is initial
    Header record should come from MCHB and RESB
    and corresponding item entries from MKOL and LFA1
    If some batch entries entries only exists in MCHB and not in MKOL then item fields will be blank
    However if some entries exists only in MKOL and not in MCHB then header fields will be filled by correponding item fields.
    Can anyone tell me the basic frame of the program.
    Regards,
    Simran

    *&      Form  sub_populate_header
          Subroutine to populate header table
    FORM sub_populate_header.
      DATA:   l_clabs   TYPE char13,     "Valuated stock
              l_bdmng   TYPE char13,     "Requirement quantity
              l_avqty   TYPE char13,     "Available quantity
              l_slabs   TYPE char13.     "Consignment stock
      DATA: i_mkol_tmp type standard table of ty_mkol initial size 0.
      LOOP AT i_mchb INTO wa_mchb.
        READ TABLE i_mkol INTO wa_mkol WITH KEY matnr = wa_mchb-matnr
                                                werks = wa_mchb-werks
                                                lgort = wa_mchb-lgort
                                                charg = wa_mchb-charg
                                                BINARY SEARCH.
        IF sy-subrc EQ 0.
    *Mark those MKOL records for deletion
          wa_mkol-mark = c_mark.         "marked for deletion
        ELSE.
    *Population of Plant,material number,batch,storage location and
    *valuated stock
          wa_header-werks = wa_mchb-werks.              "Plant
          wa_header-matnr = wa_mchb-matnr.              "Material number
          wa_header-charg = wa_mchb-charg.              "Charg
          wa_header-lgort = wa_mchb-lgort.              "Storage location
          wa_header-clabs = wa_mchb-clabs.              "Valuated stock
          l_clabs = wa_header-clabs.
          SHIFT l_clabs LEFT DELETING LEADING space.
    *Population of material description
          READ TABLE i_makt INTO wa_makt WITH KEY matnr = wa_header-matnr.
          IF sy-subrc EQ 0.
          wa_header-maktx = wa_makt-maktx.             "Material description
          ENDIF.
    *Population of Requirement quantity
          READ TABLE i_sum INTO wa_sum WITH KEY charg = wa_header-charg
                                                BINARY SEARCH.
          IF sy-subrc EQ 0.
          wa_header-bdmng = wa_sum-bdmng.              "Requirement quantity
            l_bdmng = wa_header-bdmng.
            SHIFT l_bdmng LEFT DELETING LEADING space.
          ENDIF.
    *Population of Available quantity
          l_avqty = l_clabs - l_bdmng.
          SHIFT l_avqty LEFT DELETING LEADING space.
          wa_header-avqty = l_avqty.                   "Available quantity
          APPEND wa_header TO i_header.
          CLEAR wa_header.
        ENDIF.
      ENDLOOP.
    *Deleting batches from MKOL which exists in MCHB
      i_mkol_tmp[] = i_mkol[].
      DELETE i_mkol_tmp WHERE mark = c_mark.
    *Sorting I_MKOL
      SORT i_mkol_tmp BY matnr werks charg lgort.
      LOOP AT i_mkol_tmp INTO wa_mkol_tmp.
    *Population of Plant,Material number,charg & Storage location
        wa_header-werks = wa_mkol_tmp-werks.        "Plant
        wa_header-matnr = wa_mkol_tmp-matnr.        "Material number
        wa_header-charg = wa_mkol_tmp-charg.        "Batch number
        wa_header-lgort = wa_mkol_tmp-lgort.        "Storage location
        APPEND wa_header TO i_header.
        CLEAR wa_header.
      ENDLOOP.
    ENDFORM.                    " sub_populate_header
    *&      Form  sub_populate_item
          Subroutine to populate item table
    FORM sub_populate_item .
      LOOP AT i_mkol INTO wa_mkol.
        wa_item-lifnr = wa_mkol-lifnr.      "Vendor number
        wa_item-slabs = wa_mkol-slabs.      "Consignment stock
        READ TABLE i_lfa1 INTO wa_lfa1 WITH KEY lifnr = wa_mkol-lifnr
                                                BINARY SEARCH.
        IF sy-subrc EQ 0.
          wa_item-name1 = wa_lfa1-name1.       "Vendor name
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " sub_populate_item
    *&      Form  sub_batch_stock
          Subroutine to output batch record from table (MCHB & MKOL) into
          file in application server
    FORM sub_batch_stock .
      DATA:   l_record TYPE string,      "String
              l_clabs   TYPE char13,     "Valuated stock
              l_bdmng   TYPE char13,     "Requirement quantity
              l_avqty   TYPE char13,     "Available quantity
              l_slabs   TYPE char13,     "Consignment stock
              l_tabix   TYPE sytabix.    "Index
      LOOP AT i_header INTO wa_header.
    *Separate file per plant
        AT NEW werks.
    *Creation of file
          PERFORM sub_create_file.
    Open File on the application server for processing
          OPEN DATASET g_file_name FOR APPENDING IN TEXT MODE
          ENCODING DEFAULT.
          IF sy-subrc NE 0.
    *Display error message
            MESSAGE e055 WITH g_file_name.         " Error in opening file
          ENDIF.
        ENDAT.
        AT NEW charg.
          CONCATENATE  c_header           " Header indentification
                       wa_header-werks    " Plant
                       wa_header-matnr    " Material number
                       wa_header-maktx      " Material description
                       wa_header-charg    " Batch number
                       wa_header-lgort    " Storage location
                       l_clabs            " Valuated stock-unrestricted use
                       l_bdmng            " Requirement quantity
                       l_avqty            " Avalable quantity.
                  INTO l_record SEPARATED BY
                       cl_abap_char_utilities=>horizontal_tab.
    Transfering header record to file
          TRANSFER l_record TO g_file_name.
          CLEAR: l_clabs,
                 l_bdmng,
                 l_avqty,
                 l_record.
        ENDAT.
        LOOP AT i_mkol INTO wa_mkol WHERE matnr = wa_header-matnr
                                    AND   werks = wa_header-werks
                                    AND   charg = wa_header-charg
                                    AND   lgort = wa_header-lgort.
    *Population of Vendor number and consignment stock
          wa_item-lifnr = wa_mkol-lifnr.          "Vendor number
    *Storing Consignment stock into local variable to change datatype
    *from QUAN to CHAR
          l_slabs = wa_mkol-slabs.
          SHIFT l_slabs LEFT DELETING LEADING space.
          wa_item-slabs = l_slabs.                "Consignment stock
    *Population of Vendor name
          READ TABLE i_lfa1 INTO wa_lfa1 WITH KEY lifnr = wa_mkol-lifnr
                                                  BINARY SEARCH.
          IF sy-subrc EQ 0.
            wa_item-name1 = wa_lfa1-name1.        "Vendor name
          ENDIF.
        CONCATENATE   c_item           " Item identification
                    wa_item-lifnr   " Vendor number
                    wa_item-name1   " Vendor name
                    l_slabs          " Consignment stock-unrestd. use
               INTO l_record SEPARATED BY
               cl_abap_char_utilities=>horizontal_tab.
    *Transfering Item record into file
      TRANSFER l_record TO g_file_name.
      CLEAR: l_slabs,
             l_record.
        ENDLOOP.
        AT END OF werks.
    Close File
          CLOSE DATASET g_file_name.
          CLEAR   g_file_name.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " sub_batch_stock

  • Billing Document and Material Document number and Date (Goods Issue)

    Dear Experts,
    Is there a way I can find the relationship between a billing document and a material document number and Goods issue date?
    Thanks

    Hi Abid
    Is there a way I can find the relationship between a billing document and a material document number and Goods issue date?
    You have to follow the flow from the billing document to the material document. This will only work if the billing document comes from a delivery note.
    Billing document => Delivery
    LIPS-VBELN = VBRP-VGBEL
    and LIPS-POSNR-VBRP-VGPOS
    So you have LIPS + LIKP with the LIKP-WADAT_IST as the goods issue date.
    Delivery => Material Document Number
    You can use the table VBFA with the delivery item as the preceding document number (VBFA-VBELV) and item (VBFA-POSNV) ; you will also have to define the preceding document type as J (delivery) and the document category of subsequent document as R (material document).
    Because in SAP nothing is simple, there might more than one material document, because the goods issue (601) movement might have been canceled and issue again. So you will have to decide what to do in that case.
    Best Regards,
    Franck

  • Item Relationship for Obsolete Items

    This is a question for EBS R12.1.3 - OM/Inventory setups
    We have a process where once an item is determined to be phased-out, we set up an  item relationship for an active item that will be replacing the product we no longer want to produce.  My issue is that once we consume all of the phased-out product, we uncheck the "Customer Orders Enable" flag on the item master so that it can no longer be ordered.  The problem is that if the item isn't orderable, we can't pull the item up on the OE form to see it's replacement.  This leaves our customer service blind to the product they should be selling.
    Does anyone have a recommendation for OM or Inventory setups that would allow us to see the Item Relationship on the OE Form, but not allow orders to be placed for the obsolete item?  Not sure if it matters, but we do use the OM materialized views with Item Orderablility feature.

    I created an SR with Oracle.  They stated that this is not possible and is being considered as an enhancement request.
    Bug 6612972: INACTIVE ITEM NOT SHOWN IN LOV WHEN ORDERING SUPERCEDED ITEMS
    Bug 14013746: ITEM SUBSTITUTE DOESN'T WORK FOR OBSOLETE ITEM

  • Goods picking and Post goods issue in VL02N

    Dear All,
    Am hving problem in Picking goods and Post goods issue.
    This is for the Stock Transport Order with Delivery via Shipping
    Supplying plant is 1000(SAP std,sloc 0001) and Receiving plant 1100(sloc 0001).
    Sales org:1000
    Distrbn Chnnl:10
    Division:00
    1.maintained matrial for both the plants.
    2.Creted STO by using DOC type as "UB" and item cat "U".
    3.And getting the Shipping data for the material in the STO.as shipping point is 1000.
    saved the Po.
    4.After that i done the GR w/o PO for the material using Mvt type 501.
    5.Then,VL10B creating Delivery doc.n this is also created.
    6.but when i do the picking and PGI in VL02N there picking field is greyed out bt i have tried to mangae that when i give the picking Qty in the picking qty field system is throwing the following error.
    <b>Item to be picked by WM (picking quantity cannot be entered)
    Message no. VL118
    Diagnosis
    For this item, picking is carried out using warehouse management transfer orders since the material is stored in a warehouse with random storage.
    System Response
    The system does not allow you to enter a picking quantity manually. The picking quantity is copied automatically into the delivery during the creation of the corresponding transfer order.</b>
    is any data missed by me while doing this process?
    pls let me know n help me in this regrds
    Thank you all

    Hi Vijay
    By changing storage location you could do b'coz the new storage location is not maintained with warehouse, hence no need to perform warehouse transactions (TO creation and confirmation) before inventory mgmt transactions (PGI).
    For trying pick up with WH, first u should have enough stocks in approppriate storage bins and u should perform pick up by creation of TO and confirmation.
    warm regards
    sairam akundi

  • Partners in Header and Item level

    Hi,
    I am creating a credit memo through the following steps.
    1. Create rebate agreement in VBO1.
    2. Create sales order in VA01.
    3. Release through VKM4.
    4. Create delivery through VL01n.
    5. Post goods issue.
    6. Create billing document through VF01.
    7. Update billing doc through VBOF.
    8. Settle rebate agreement through VB(7.
    When the credit memo is created,in debugging mode(VB(7),if I change the partner for "header", partner for "item" is also getting changed.This is as per my requirement. But I wanted to know whether there can be a case where item partners are different than header partners. (Right now I am having only one line item in credit memo.I am not being able to create a credit memo with more line items by repeating all the steps  above).

    Sowrabha
    It is possible to have different Partners for Header and Items...  However, in your scenario it doesn't create any problem, as it all depends on the Partner Determination Procedures in the customising....
    Thanks
    Amol Lohade

  • Order and item status in sales order

    We had multiple items in the sales order
    for one of the item, the quantity was 5, but user cretaed a delivery of 8. but she only post goods issue for 5.
    the delivery and order was open
    at this stage the archival of delivery took place.
    we changed the status in tables vbuk and vbup to complete.
    but in the display of status in sales order, it still shows being processed.
    What can we do now to set the order status and item status to COMPLETE.
    Thank you for your reply

    Hi,
    This order status will not be complete unless the delivered quantity is equal to the order quantity. You have 2 options. 1. Change the order quantity to 8 and delliver the rest 3 and the order status will be set to COMPLETE. 2. Otherwise, reverse the PGI in VL09n and delete the delivery and create the delivery again for 5 qty. This will set the order status as COMPLETE.
    Regards,
    Raghav

  • Invoice ref and item text not printing in check ( F110)

    Hi Experts,
    When i tried to print check using tcode F110 by following the procedure , i came to know in structure REGUP , invoice reference ( regup-rebzg) and item text ( regup-sgtxt) are not updating in REGUP . I checked this in debugger mode.
    Also reference number ( regup-xblnr ) is updated in structure ,but not displaying in output check format.
    Actually we are using ( ECC 6.0 ) zform and z print program zRFFOUS_C which are copied from std one and made some changes.
    Even I checked for standard FORM F110_PRENUM_CHCK and RFFOUS_C by changing
    in FBZP configuration level (assiging std form and std program ).
    In this also same issue as mentioned above in debugger mode.
    kindly give me any suggestions .
    My requirement is to print
    1. invoice reference ( rebzg)( instead of document number)
    2. reference number (xblnr )( same as your document )
    3 . item text ( sgtxt )
    4. amount ( wrbtr)
    Thanks & regards,
    Rahul

    Hi all,
    I too am facing the problem of missing document numbers and invoice text while using F-58 for printing cheques. I am using the standard program RFFOUS_C but have customized the scrip F110_PRENUM_CHCK. If anyone has a solution to this problem please suggest.
    Thanks,
    BP

  • Different division at header and item level in Order

    Hi Gurus,
    i am facing this issue where while creating quotation in CRM i entered sold to party, selected the org data ( OA/DI/OP ). i entered the product with quantity. now at item level in Organization tab my sales area is showing as ( OA/DI/01). system is picking the division maintained for product which is 01) so division is different at header and item level. i need the header division to be used at item level as well.
    how can i achieve this?
    Thanks and Regards
    Sudhir Grover

    Hi Sudhir,
    Make sure the settings in the SPRO>CRM>Master Data>Products>Special Settings for Sales Operations--> Define Division settings is activated with Header Div. Act.
    Also check the details in the IMG activity documentation for define division settings.
    Hope this helps.
    Regards,
    Chandrakant

  • Migo is not showing the excise tab - header level and item level

    Hi,
    i have created one PO with excise and i have created MIGO with only capture excise invoice, in MIGO before saving the document system is showing the excise basic, cess and higher education cess in excise tab, header level as well as item level. After saving the document, if i go to dispaly view of the MIGO document system is not showing the header level as well as item level excise amount. The tab itself is not appearing. Can any one help me on this.

    Hi,
    There are two kinds of statuses, system status and user status.
    You can only influence System status if you execute a business transaction that changes the system status.there
    are four system statuses open, In process,Released and Completed.
    User status can be created as additional information to the system status in any numbers.But for this you
    need to define a status profile which would further be assigned to transaction type(header status) and
    item categories(item status).
    The header status is independent of the item status. One exception is the status Completed.
    If all items have the status Completed, the header status is also set to Completed.
    For defining a status profile you need to go to
    SPRO>Customer Relationship Management>Transactions>Basic settings>Status Management.
    Hope this helps.
    Regards
    Sidd

Maybe you are looking for

  • Problems with Seeburger FTP Receiver adapter

    Hello, I am working on a scenario sending ORDERS05 Idocs to EDI vendors. For this i have configured Seeburger Receiver FTP adapter with 2 modules to convert XML-EDI format. Since this is the test, I have pointed Seeburger to local FTP server with fol

  • Ipad is disable. please help

    i try to connect it to itunes but it says device is unrecognised please help

  • I need help with photoshop

    I try to edit m photo in lightroom 4 and when i click on edit and try to edit my photo in photoshop it wont let me click on it. It acts like it is not on my computer. Can You Help?

  • Restore Backup of Torch 9800 to Z10

    Hello Is it possible to restore the data from your backup of your 9800 to the new z10? I appreciate there may be some slight compatability issues but in general, contacts, SMS/MMS/emails etc, will those restore to the Z10 or not??? Bit confused as he

  • Moving to a new computer. How do I move my Apps and Purchased music over?

    Can anyone help me understand what have to do to move my Apps and Purchased music to a new computer? There seem to be lots of articles about it but no single set of steps. I will transfer all my non-iTunes library and rebuild the library, etc. But ho