Query to display BOMs Header and Item

Hello SAP gurus
I am trying to create a query to display BOMs with header and item. For that I am using tables MAST, STKO and STPO.
The table join is:
MAST -> STKO -> STPO
MAST - WERKS, STLNR and STLAL
STKO - STLNR and STPOZ
The system dont show anything...
Can someone help me?
Thanks in advance.
Adelmo Silva

Yes, it works but...
If I have 2 alternatives, the system show everything even if i select alternative 1 or 2.
I am missing something... because system is showing all alternatives...
System is showing something like this:
Material     BOM     AltBOM     BOM St     Item     ICt     Component     Valid from     Quantity     Un
726121012     00131075     1     01     0010     L     109219     17-12-2007     0,200     KG
726121012     00131075     1     01     0020     L     109230     17-12-2007     0,003     KG
726121012     00131075     1     01     0030     L     109232     17-12-2007     1,166     M2
726121012     00131075     1     01     0040     L     726004012     17-12-2007     0,120     M3
726121012     00131075     1     01     0010     L     109526     17-12-2007     0,200     KG
726121012     00131075     1     01     0020     L     109232     17-12-2007     1,166     M2
726121012     00131075     1     01     0030     L     726004012     17-12-2007     0,120     M3
Edited by: Adelmo Silva on Jan 9, 2008 9:07 AM

Similar Messages

  • Valid to date for BOM Header and Item

    Hello everyone,
    I have been searching for "valid-to" date for BOM header and Items since several days but no luck ..
    I know we can see it using transactions cs11/cs03 etc. But i wish to know the table where they are stored. As I need to extract them to BW.
    Any help will be highly appreciated.
    Thanks in advance!
    Regards,
    Anuj

    Hi Anuj
    In table STPO,the field AEDAT gets updated only when a change number is used,otherwise the valid to date will be shown nil here.
    And also ref the link
    Problem finding Valid To Date or Change number to on BOM
    pavan

  • Which BAPI is for reading Header and Item for BOM.

    Hi All,
    I am using BAPI named 'CSAP_MAT_BOM_READ' to read Material type BOM header and Item.
    1. Is there any BAPI available to read Equipment Header and Item  ?
    2. Is there any BAPI available to read Functional Loc Header and Item  ?
    3. Any BAPI to Write into Database table from my internal table (Header and Item) ?
    Edited by: amit soni on Aug 26, 2011 11:25 AM

    1. BAPI_EQUI_GETDETAIL
    2. BAPI_FUNCLOC_GETDETAIL
    3. BAPI_EQUI_CREATE, BAPI_FUNCLOC_CREATE for equipment, and functional location respectively.
    Have you browse in BAPI transactions?

  • Header and item data in po

    Hi,
    What are all the tables from which the data would be taken to display in header and item data in process PO ? From where these data would be taken ?
    Thanks alot.
    Regards, Sunayana N

    ADR10 Printer (Business Address Services)
    ADR11 SSF (Business Address Services)
    ADR12 FTP and URL (Business Address Services)
    ADR13 Pager (Business Address Services)
    ADR2 Telephone Numbers (Business Address Services)
    ADR3 Fax Numbers (Business Address Services)
    ADR4 Teletex Numbers (Business Address Services)
    ADR5 Telex Numbers (Business Address Services)
    ADR6 E-Mail Addresses (Business Address Services)
    ADR7 Remote Mail Addresses (SAP - SAP - Communication; BAS)
    ADR8 X.400 Numbers (Business Address Services)
    ADR9 RFC Destinations (Business Address Services)
    ADRCOMC Comm. Data Serial Number Counter (Business Address Services)
    ADRCT Address Texts (Business Address Services)
    ADRG Assignment of Addresses to Other Address Groups (BAS)
    ADRGP Assignment of Persons to Further Person Groups (BAS)
    ADRT Communication Data Text (Business Address Services)
    ADRU Table for Communication Usages
    ADRV Address Where-Used List (Business Address Services)
    ADRVP Person Where-Used List (Business Address Services)
    BBP_PDACC Account Assignment
    BBP_PDATT Document Attachment
    BBP_PDBEH Backend Specific Header Data
    BBP_PDBEI Backend Specific Item Data
    BBP_PDBGP Partner Extension Gen. Purchasing Data
    BBP_PDBINREL Transaction Object Linkage (EBP)
    BBP_PDCON Purchase Order Item Confirmation
    BBP_PDHAD_V Business Transaction Versions
    BBP_PDHCF Set for Tabular Customer and Solution Fields on Hdr
    BBP_PDHGP Business Transaction Purchasing Information
    BBP_PDHSC Header Extension for Customer Fields
    BBP_PDHSS Hdr Extension for SAP Internal Enhancements (IBUs and so on)
    BBP_PDIAD_V Business transaction item
    BBP_PDICF Set for Tabluar Customer and Solution Fields on Itm
    BBP_PDIGP Business Transaction Item-Purchasing Information
    BBP_PDISC Item Extension for Customer Fields
    BBP_PDISS Item Ext. for SAP Internal Enhancements (IBUs and so on)
    BBP_PDLIM Value Limit
    BBP_PDLINK_V Transaction - Set - Link
    BBP_PDORG Purchasing Organizational Unit
    BBP_PDPSET Further Procurement Information
    BBP_PDTAX Tax
    BBP_PDTOL Tolerances
    CDCLS Cluster structure for change documents
    CDHDR Change document header
    CDPOS_STR Additional Change Document - Table for STRINGs
    CDPOS_UID Additional Table for Inclusion of TABKEY>70 Characters
    CRMD_LINK Transaction - Set - Link
    CRMD_ORDERADM_HBusiness Transaction
    CRMD_ORDERADM_IBusiness Transaction Item
    CRMD_PARTNER Partners
    CRM_JCDO Change Documents for Status Object (Table JSTO)
    CRM_JCDS Change Documents for System/User Statuses (Table JEST)
    CRM_JEST Individual Object Status
    CRM_JSTO Status Object Information
    SROBLROLB Persistent Roles of BOR Objects
    SROBLROLC Persistent Roles of Business Classes
    SRRELROLES Object Relationship Service: Roles
    STXB SAPscript: Texts in non-SAPscript format
    STXH STXD SAPscript text file header
    STXL STXD SAPscript text file lines
    TOA01 Link table 1
    TOA02 Link table 2
    TOA03 Link table 3
    TOAHR Container table for HR administration level
    TCURR- Exchange table

  • BOM Header and BOM Item Enhancements

    Hi all,
    I just want to make sure I got this correct so far and looking for further info. I have some z-fields(custom fields) that I'm adding to CI_STKO (BOM Header) and CI_STPO (BOM ITEM). I need to be able to display these fields in transactions CS02,CS03,CS11,CS12,CS13. I think I'm suppose to use the following enhancements:
    PCSD0003 : BOMs: Customer fields in header
    PCSD0002 : BOMs: Customer fields in item
    Can anyone give me some info on the screen exits in these enhancements if this is correct and if not can someone give me some guidence to displaying the z-fields in these transaction?
    Message was edited by:
            Akeem Lockett

    You will have to make all the modifications inside the function group XCSA.
    You wiill get the necessary exits there.
    For displaying the custom fields you can use the screens 701 to 721. These are subscreens for displaying the item details. The moment you make changes here in these screens , you will be able to see the effect in CS01/02/03.
    Hope it helps.

  • Display constant values in header and items from table in ALV

    Hello all,
    I have to dispaly the header and Item entires in the output . and the point is header values are all constant and they are not related to item data .  item data is to dispalyed from VBAP table .
    so how can i achive this .. can i use this FM REUSE_ALV_HIERSEQ_LIST_DISPLAY ...
    example of outpput..
    Header inforamtions..
    name             city                  areacode              areazone            postzip
    abcde            xyz                   1244                    abc                      123456
    and the item details should be right below the header details
    Cnt     Vbeln            vkorg                vtweg               matnr       etc           etc
    1         xxx               xx                         xx                 xxxx         xxx          xxxx
    2        xxx               xx                         xx                 xxxx         xxx          xxxx
    3       xxx               xx                         xx                 xxxx         xxx          xxxx
    4      xxx               xx                         xx                 xxxx         xxx          xxxx
    5    xxx               xx                         xx                 xxxx         xxx          xxxx
    6   xxx               xx                         xx                 xxxx         xxx          xxxx
    I am able to dispaly the line items with the FM 'REUSE_ALV_GRID_DISPLAY' plz advice  the best solution to achive this
    thanks
    Raj
    Edited by: abaprthree on Oct 28, 2009 12:30 PM

    Hi,
    For this you will need to define header for the ALV. Here is a simple example how to do this:
    First you need to write one Header form like following:
    FORM f004_header  USING it_head TYPE slis_t_listheader..
      DATA : wa_line TYPE slis_listheader.
      CLEAR wa_line.
      wa_line-typ = 'H'. " H = Header, S = Selection, A = Action
      wa_line-info = 'List of Sales Orders'.
      APPEND wa_line TO it_head.
    " Here type out all the required data one by one in work are and append it to internal table
    ENDFORM.                    "f004_header
    before calling REUSE_ALV_GRID_DISPLAY you need to call following
    TO HEADER EVENT
    FORM f006_top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_header.
    ENDFORM.                                                   
    and for REUSE_ALV_GRID_DISPLAY call as following
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_top_of_page   = 'F006_TOP'
          it_fieldcat              = t_fieldcatalog[]
        TABLES
          t_outtab                 = it_data.
    Let me know if any other help is needed.

  • Z-Report for PR using ES language not getting the Header and Item text deta

    Hi,
    We have developed Z report for PR report and we ahve used ES and EN language, but when i select language ES and execute the report then we are not getting the Header and Item text data,
    Secondly when We select language EN and execute the report then we are getting the Header and Item text details.
    Please guide me.
    Thanks
    Shital

    Have you maintained Tetexxt in ES language or is it that you are expecting  on selecting ES the text from En will get coverted to ES and display in your report?

  • Header and Item table - Form Design Question

    Hi All,
    I have a header table and Item table. For every record in the header table I have multiple records in the item table. I want to have a adobe form in the following way
    1. A new page starts for every record in the header table and Items in the item table for this header record can span multiple pages with the same header information.
    2. When all the items are displayed for that particular header record, a new page should start for the next header record.
    I created one internal table in the following way
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    I am not sure how to use a table for this scenario (Should It be a nested table?).
    Please provide me some ideas.
    Thanks,
    Ganesh.

    Hi Balasubramani,
    I made some changes and have the following now. Can you please let me know how I can achieve page break for every BP_NUMBER.
    I have a nested table like the one below.
    Main table u2013 Has header and Items information. Every header record has some header information like BP number, name and all line items for that BP in a nested table .
    IT_HEADER:
    BP_NUMBER     BP_NAME           IT_ITEMS(Items table)
    BP_NUMBER     BP_NAME           IT_ITEMS
    BP_NUMBER     BP_NAME           IT_ITEMS
    To display this information I created the following
    Subform1 u2013 overflow u2013bound to $record.IT_HEADER.DATA[*] u2013 (Repeat sub form for
    |                                             each data item)
    |->Header sub form u2013 Positioned
    |     |
    |     |-> Text Field u2013 bound to BP_NUMBER
    |
    |
    |->Item sub form -
         |     
         |->Item Table u2013 bound to IT_ITEMS
              |
              |->Data u2013 bound to IT_ITEMS.DATA[*] u2013(Repeat row for each data item)
    In the output BP number in the first record of IT_HEADER gets displayed and then all the Item records in IT_ITEMS for that BP get displayed. This is repeated all the records in IT_HEADER which is perfectly fine.
    Please provide me some suggestions to solve the following issues I am having
    1.     I need a page break between records of IT_HEADER. I want the new subform1 for the next header record to start in a new page. I tried conditional break option, on the only field BP number in header sub form. I have two master pages and two body pages. All the above information is in master page 2 and body page 2.  I am also not sure what to select in the TO section of the conditional break screen.
    2.     When there is an overflow in IT_ITEMS I need the Header sub form to be shown in the next page too.
    Thanks,
    Ganesh.

  • Header and Item Odata through SEGW

    Hi,
    I know that this Topic was raised million times, but still raising this query. I have already consulted http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0d92637-3d0d-2f10-ebb2-efc1f40a85e8?QuickLink=index&… link.
    Requirement: Create Header and Item Odata THROUGH SEGW.
    Steps I have followed:
    1. Created Header and Item Structure and have added them in the Export Parameters of an RFC.
    2. Created the RFC and have populated the the internal tables corresponding to the Header and Item structures.
    3. Go to Transaction SEGW and Imported the Header from the RFC. Then created Read and Query mapping for Header.
    4. Go to Transaction SEGW and Imported the Item from the RFC. Then created Read and Query mapping for Item.
    5. Created an association between "ID" of Header with "ID" of Item. Cardinality- 1:N
    Observation:
    Now when I run the Odata and execute /sap/opu/odata/sap/ZTEST_SRV/HDRSet(2)/ITEMSet, I get all the Items from the Item table for Each and every Header. But I guess for every header corresponding Items should have been enlisted.
    Is there any step that I am missing?
    Important: In the MPC class(ZCL_TEST_MPC), I could see a method named DEFINE_ASSOCIATION. I have put an external Breakpoint in it, but this breakpoint is not triggered.
    -Regards
    Dhrubajyoti

    Hii Dhru,
    In addition to the steps followed, you have to create navigation property using association created.
    You have to implement Get_expand_entityset method in DPC method for multiple headers and corresponding items and for single header and corresponding items you have to implement GET_EXPANDENTITY method.
    The URL is as format below :
    /sap/opu/odata/sap/<service name>/<Header entity set>/?$expand=<navigation property from header to item>&$filter= eq '<ID>' '<value>'
    Example URL : https://<server>:<port>/.../<service_name>/SalesOrders?$expand=SalesOrderItems
    For reference :
    https://help.sap.com/saphelp_gateway20sp08/helpdata/en/ca/c683e803494b77a2e1290b987556e2/content.htm
    When GET_EXPANDED_ENTITYSET method invoked
    For get_expanded_entity_set method implementation please refer the below URL
    http://scn.sap.com/community/gateway/blog/2014/07/18/implementing-expand-entityentity-set
    Regards,
    Lokeswar Reddy byni.

  • Header and Item data in a module pool

    Hi Friends,
    I designed a screen in that i have header data and item data.
    Here in my screen header i have vendor number,Vendor name,
    bank Name, Branch, LC value and Due date fields.
    and for item details i have to take table control.In the item details i have the fields Sl No, PO Number and Po Value.
    and Two push buttons i need to put.SAVE and CANCEL.
    When i click on SAVE all my screen details should be saved in a ZTABLE and should generate a LCDOCUMENT-Number from the system.
    So my question is shell i take the two tables for header and item data or one is enough and if i take two tables(one is header and one is item data) how i write the logic to store into the ztables.
    How can i proceed.Plz provide me with ur inputs
    Thanks and Regards.

    Hi!
    you have to take one table.....in which u have to move the header and item data into that b'coz according to the header data the items are to be displayed.......
    select the data for which ever tables they came and then take a final table in which include all the fields of header and item .loop on all the tables from which data u have taken and inside it move the data of those fields into the fields of the final table.
    In the ALV u need to call the function module to display the ALV with that final table in which ur all data is there and prepare a field catalog of those fields you want to display in the item list.
    for example a sample code is there...
    types:
      begin of type_s_vbak,
        vkorg type vbak-vkorg,             " Sales Organization
        aufnr type vbak-aufnr,             " Sales Order Number
        auart type vbak-auart,             " Sales Order Type
        kunnr type vbak-kunnr,             " Customer Number
        vbeln type vbak-vbeln,             " Sales Document
        knumv type vbak-knumv,             " Number of Document Condition
      end of type_s_vbak.                  " BEGIN OF TYPE_S_VBAK
    types:
      begin of type_s_konv,
        kwert type konv-kwert,             " Condition Value
        kbetr type konv-kbetr,             " Rate (Condition Amount)
        knumv type konv-knumv,             " Number of Document Condition
        kschl type konv-kschl,             " Condition Type
      end of type_s_konv.                  " BEGIN OF TYPE_S_KONV
    types:
      begin of type_s_material,
        kunnr      type vbak-kunnr,          " Customer Number
        matnr      type vbap-matnr,          " Material Number
        arktx       type vbap-arktx,          " Material Description
        steuc       type marc-steuc,          " Fiscal Classification
        kwmeng   type vbap-kwmeng,         " Quantity
        knumv      type vbak-knumv,          " Number of Document Condition
        vbeln        type vbak-vbeln,          " Document Number
        kwert       type konv-kwert,          " Condition Value
        total         type p length 14 decimals 2,
                                           " Total
        ipitype  type p length 9 decimals 3,
                                           " IPI Type
        ipivalue type konv-kwert,          " IPI Value
      end of type_s_material.              " BEGIN OF TYPE_S_MATERIAL
    data:
      fs_vbak type type_s_vbak.
    data:
      fs_mati type type_s_material.
    data:
      fs_konv type type_s_konv.
    data:
       t_vbak like
    standard table
           of fs_vbak.
    data:
       t_konv like
    standard table
           of fs_konv.
    data:
       t_mati like
    standard table
           of fs_mati.
    loop at t_konv into fs_konv where kschl eq 'ZPNF'.
        move fs_konv-kwert to fs_mati-kwert.
        modify t_mati from fs_mati
        transporting kwert
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying Total Field of Material Table.
      loop at t_mati into fs_mati.
        w_total = fs_mati-kwmeng * fs_mati-kwert.
        move  w_total to fs_mati-total.
        modify t_mati from fs_mati
        index sy-tabix
        transporting total.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Type Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        w_total = fs_konv-kbetr div 10.
        move w_total to fs_mati-ipitype.
        modify t_mati from fs_mati
        transporting ipitype
        where knumv eq fs_konv-knumv.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Value Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        move fs_konv-kwert to fs_mati-ipivalue.
        modify t_mati from fs_mati
        transporting ipivalue
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    and then fill the fieldcatalog and display the ALV
    Edited by: Richa Tripathi on Apr 15, 2009 3:28 PM

  • Blocked ALV Header and Item Displau

    Hi Friends,
    I`m new to ABAP and the forum.I`m in dire need of solution for a report.
    Scenario
    I have an internal table with fields ebeln vbeln adrnr.
    For every change in ebeln i need to create a new page in ALV and display the item VBELN and some more fields.
    Its like a header and item in a single page of alv report.
    Is there a possibility to use ALV here or only classical report can be used in the scenario???

    Hi,
    For Blocked alv header and item display you
    declaration internal table fields ebeln vbeln adrn
    TYPE-POOLS SLIS.
    TYPES : BEGIN OF TY_EKKO,
         EBELN TYPE EKKO-EBELN,
         AEDAT TYPE EKKO-AEDAT,
         vblen TYPE EKKO- vbeln,
         END OF TY_EKKO.
    DATA : IT_EKKO TYPE TABLE OF TY_EKKO,
         WA_EKKO TYPE TY_EKKO.
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
         IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_EVENTS TYPE SLIS_ALV_EVENT,
         IT_EVENTS TYPE SLIS_T_ALV_EVENT,
         IS_LAYOUT TYPE SLIS_LAYOUT_ALV.
    For Build catalog
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'EBELN'.
    WA_FIELDCAT-SELTEXT_M = 'PO NUMBER'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-KEY = 'X'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'AEDAT'.
    WA_FIELDCAT-SELTEXT_M = 'DATE OF CREATION'.
    WA_FIELDCAT-COL_POS = 2.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'LIFNR'.
    WA_FIELDCAT-SELTEXT_M = 'VENDOR NO'.
    WA_FIELDCAT-COL_POS = 3.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    read_data :
    SELECT * INTO TABLE IT_EKKO FROM EKKO UP TO 20 ROWS.
    print_header :
    DATA : IT_LIST TYPE SLIS_T_LISTHEADER,
         WA_LIST TYPE LINE OF SLIS_T_LISTHEADER.
    CLEAR WA_LIST.
    WA_LIST-TYP = 'H'.
    WA_LIST-INFO = 'LIST OF PURCHASE ORDERS'.
    APPEND WA_LIST TO IT_LIST.
    Header along with write statement at top-of-page then use these function module
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LIST

  • Checkbox in header and item level records.

    Hello Freinds,
    I have a requirment in which I need to display checkboxes in front of header as well as item level records. I am trying to make a copy of standard transaction VL37. This transaction uses the REUSE_ALV_HIERSEQ_LIST_DISPLAY for displaying header and item level data. I debugged and found that in the alv layout there is a field with name box name. If we pass the name of header internal table to that field then we can get checkbox in front of header level records and if we pass item level internal table name then it shows the checkbox in front of item level records.
    Can anyone provide some possibility of adding checkbox for both header and item level records while using the same ALV FM.

    Hello Harsh,
    I am also kind of facing the same issue. I have used the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for ALV display. And I need to add checkbox at item level.
    I have tried to add checkbox through field catalog. Following is the code I'm writing.
    l_wa_fieldcat-fieldname = l_c_flag.
    l_wa_fieldcat-tabname   = l_c_item.
    l_wa_fieldcat-checkbox  = abap_true.
    *l_wa_fieldcat-edit_mask = abap_f.
    l_wa_fieldcat-edit      = abap_true.
    l_wa_fieldcat-key       = abap_true.
    l_wa_fieldcat-seltext_m = l_c_flag.
    APPEND l_wa_fieldcat to em_it_fieldcat.
    But in this case the checkbox appears in disabled form.
    Can you please help? Could you be a bit elaborate on your answer i.e. the code snippet? Many thanks.
    Regards,
    Debapriya

  • Disable header and item fields in VA02

    Hello, good day
    Could you please help me with next issue?
    I need to define how to inactivate some header and item fields in a sales order when VA02 is used, a logic to decide if the field must be desable will be applied, because of that I can't use standar customizing solution.
    I read a lot of threads, but many of them are not answered, and as far as I can see many recommended solutions are refered to similar code that I have now.
    I tried with next user exits:
    To block gray out header and item fields:
    User exit form USER_EXIT_FIELD_MODIFICATION Program: MV45AFZZ
    To gray out pricing grid
    User exit form: USEREXIT_FIELD_MODIFICATION Program: LV69AFZZ
    To gray out partner screens (item, header): No user exit identified, please advise
    to gray out new items in sales order: No user exit identified, please advise, I mean not allow new items.
    fields to block:
    XVBAK-LIFSK
    XVBAK-FAKSK
    XVBAK-KUNNR
    XVBKD-VSART
    XVBKD-INCO1
    XVBAP-UNTTO
    XVBAP-UEBTO
    XVBPA-KUNNR
    XVBPA-PARW
    XVBAP-ROUTE
    XVBAP-ABGRU
    The code is something like this in MV45AFZZ - USER_EXIT_FIELD_MODIFICATION
          CASE screen-name.
            WHEN    'XVBAK-KUNNR'
                 OR '*XVBAK-KUNNR'.    "Sold To
              screen-input = 0.
           END CASE
    but is not working. please advise.
    Disable Pricing grid: after apply this code, is possible to add new manual conditions, how can I disable input new item conditions?
    The code is something like this in  LV69AFZZ - USEREXIT_FIELD_MODIFICATION Program:
      Modify screen fields
        IF   SCREEN-NAME = 'RV61A-KOEIN'
          OR SCREEN-NAME = 'KOMV-KBETR'
          OR SCREEN-NAME = 'KOMV-KPEIN'
          OR SCREEN-NAME = 'KOMV-KMEIN'
          OR SCREEN-NAME = 'KOMV-KWERT'
          OR SCREEN-NAME = 'KOMV-KSCHL'
          OR SCREEN-NAME = 'KOMV-KUMZA'
          OR SCREEN-NAME = 'KOMV-KUMNE'
          OR SCREEN-NAME = '*RV61A-KOEIN'
          OR SCREEN-NAME = '*KOMV-KBETR'
          OR SCREEN-NAME = '*KOMV-KPEIN'
          OR SCREEN-NAME = '*KOMV-KMEIN'
          OR SCREEN-NAME = '*KOMV-KWERT'
          OR SCREEN-NAME = '*KOMV-KSCHL'
          OR SCREEN-NAME = '*KOMV-KUMZA'
          OR SCREEN-NAME = '*KOMV-KUMNE'.
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
      Modify buttons
        IF   SCREEN-NAME = 'BT_KOAN'    "Add
          OR SCREEN-NAME = 'BT_KOLO'.   "Delete
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
        IF   SCREEN-NAME = 'BT_KONY'.   "Update
             SCREEN-ACTIVE = '1'.
             SCREEN-INPUT = '0'.
             MODIFY SCREEN.
        ENDIF.
    Thanks in advace.
    Regards!

    Thanks Sai, for your prompt answer, as far as understand variants, I can't add any logic, to allow change or only display, I do no't include the logic in the sample code, but that's my case, I need the user exit due a logic must be applied and standar solution like variant or customizing are not the better option.
    I Found that in order to gray pricing grid we just put the code in user exit form: userexit_field_modific_leer include  LV69AFZZ
    and to block the other fields  and to block partner functions:
    Include Program: MV45AF0P_PARTNER_PREPARE                    User Exit Form: partner_prepare
    Edited by: Jose Carrillo on Mar 30, 2008 4:21 AM

  • 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

  • Smartform Template -  Header and Items itab

    All,
    I wanna use template node in smartform as the number of rows should be fixed.
    I have two internal tables one each for header and items.
    I'm not sure how to proceed.
    Help is highly appreciated and rewarded
    Regards,
    Younus

    Younus,
      As per your query you know that no. of header and line items are fixed(total  records ).
    Ex : you have 3 header and 6 item
    Make  template with 9 rows and 1 for heading(column names).
    sales order no   Sales document item     material
    1                         A                               K
                                B                               L
    2                           C                               M
                                 D                               N
    3                            E                               O
                                  F                               P
    while passing data to templat
    when new sales order then only write the orderno else
    item values.
    Don't forget to reward if useful...

Maybe you are looking for