Hi frnds regarding ME01

Hi frnds,
              Very Urgent....
              Is there any BAPI for ME01 for Uploading data.
Points will be rewarded....
Thanks & Regards,
Sirirsha.

Hi,
BAPI_SOURCEDETERMIN_GETSOS : Determine Sources for Material/Material Group
You can use this method to determine source of supply.
Notes
You must supply the method with either a material or a material group plus a plant and the delivery date.
If you wish to limit the output, you can also pass on data such as the following:
1)      a purchasing organization: You will then get the sources from which this purchasing organization can procure.
2)      a vendor  :You will then get the sources for this vendor.
3)     a unit of measure :You will then get the sources with this unit of measure.
Return messages
Messages are returned in the parameter return. The parameter documentation shows the return codes and their meanings.
Parameters:::::::::::::::::
MATERIAL
MAT_GRP
PLANT
DELIV_DATE
QUANTITY
UNIT
ITEM_CAT
ACCTASSCAT
PURCH_ORG
FIXED_VEND
PCKG_NO
UNIT_ISO
MATERIAL_EVG
SOURCES_OF_SUPPLY
RETURN
Regds
Sivaparvathi
reward points if helpful

Similar Messages

  • HI Frnds Regarding 'BAPI_Basicpay_change.' Urgent........

    Hi Hr Masters,
                 I would like change the Basic pay of the employes as per my client requirement. Infotype table is PA0008.In my Company I need to change the Basic salary of employees like Staff and Workers based on Payscale. I have used for
    'BAPI_BASICPAY_CHANGE' Function module. I have passed all the parameters still it is not working as per my requirement. it is saying that...
    'NO data stored for 0008 in the selected period'. I have checked all the possibilties but i didnt get any solutions. Anyone can help me for this.
    Thank very much..
    Sirisha..

    It is possible, the values that are being passed to the BAPI are either incorrect or in the wrong format.. Pl use the function call HR_READ_INFOTYPE to read the existing 0008 record & then pass the corrected record to the BAPI.. that way you not only ensure that the record exists, but will be sure about the data format as well..
    ~Suresh

  • Hi frnds regarding ale/idoc.

    hi all,
                 can anyone send me good ALE/IDOC links.
                  it would be helipful fo me.
      with regds
      Sirisha.

    Hi Sirisha,
    <b>ALE</b>
    ALE means of creating and operating distributed applications.
    Application Link Enabling (ALE) guarantees a distributed, but integrated, R/3 installation. This involves business-controlled message exchange using consistent data across loosely linked SAP applications.
    Applications are integrated using synchronous and asynchronous communication - not by using a central database.
    ALE consists of the following layers:
    Application services
    Distribution services
    Communication services
    Refer
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    Check this link ALE and EDI
    IDoc is a intermediate document to exchange data between two SAP Systems.
    *IDocs are structured ASCII files (or a virtual equivalent).
    *Electronic Interchange Document
    *They are the file format used by SAP R/3 to exchange data with foreign systems.
    *Data Is transmitted in ASCII format, i.e. human readable form
    *IDocs exchange messages
    *IDocs are used like classical interface files
    IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
    WE30 - you can create a IDOC type.
    An IDOC with data, will have to be triggered by the application that is trying to send out the data.
    FOr testing you can use WE19.
    How to create idoc?
    *WE30 - you can create a IDOC type
    For more information in details on the same along with the examples can be viewed on:
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappoint.com/presentation.html
    http://www.allsaplinks.com/idoc_search.html
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.erpgenie.com/sapedi/idoc_abap.htm
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30 )
    Create Message Type ( WE81 )
    Assign Idoc Type to Message Type ( WE82 )
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    Check these out..
    Re: How to create IDOC
    Check below link. It will give the step by step procedure for IDOC creation.
    http://www.supinfo-projects.com/cn/2005/idocs_en/2/
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
    Please check this PDF documents for ALE and IDoc.
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    Also check this links for additional information.
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Regarding string

    Hi frnds,
                  I have a requirement where i have to find the position numbers of '#' in the complet string.
    can anyone help me how to approach.
    <code>
    REPORT  ZTEST_POSITIONFINDER.
    data : var1 type string .
    var1 = '210651#WHA-588QV#11/26/2007 10:58#527.02#526.99#526.99#17640207#ALLEN K  WITHRAW J#1000#CVGOGG20071118NL02#Approved on link to booking.#'.
    </code>
    help me frnds
    regards,
    satish

    Satish,
      I forgot to add one more line in my earlier mail.Check now this.
    DATA : v_cnt TYPE I,
    v_num TYPE I,
    v_num1 TYPE I,
    v_pos(100).
    var1 = '210651#WHA-588QV#11/26/2007 10:58#527.02#526.99#526.99#17640207#ALLEN K WITHRAW J#1000#CVGOGG20071118NL02#Approved on link to booking.#'.
    v_cnt = strlen( var1 ).
    DO v_cnt TIMES.
    v_count = v_count + 1.
    IF var1+v_num1(v_count) EQ '#' .
    concatenate v_count ',' INTO v_pos.
    v_count  =  v_count + 1.*
    ENDIF.
    ENDDO.
    Write : v_pos.
    Here you can see the # position numbers seperated by coma(,).

  • Regarding CO & CA

    Hi frnds,
                  This is a simple logic which i felt shuld work in my exit where we are making the Telephone number field as mandatory entry of numbers only between
    0-9.
    so This is what i tried.
    <code>
    DATA : V_TELF1(16) TYPE C.
    V_TELF1 = I_KNA1-TELF1.
    if v_telf1 CA '0123456789'.
    MESSAGE 'GOOD' TYPE 'S'.
    ELSE .
    message 'PLEASE ENTER NUMBERS BETWEEN 0-9 ONLY' type 'E'.
    ENDIF.
    </code>
    Here the problem is when i m giving only characters then its going out but when i giving some charcters and some values then the condition is getting true.
    I have also tried with 'CO' ,its always becoming false.
    so any solutions frnds.
    regards,
    sanjay

    declare one more variable of type n
    i.e
    DATA : V_TELF1(16) TYPE N.
    DATA : CV_TELF1(16) TYPE C.
    CV_TELF1 = I_KNA1-TELF1.
    V_TELF1 = CV_TELF1.
    if V_TELF1 CS CV_TELF1.
           write : 'correct number'.
    else
           write: ' wrong number'.
    endif.

  • Invoice calculation

    Hi frnds,
                 i hav to do some calculations for invoice quantity.
    Units still to be invoiceIf not history (not matching records of EKPO in EKBE)
    INVOI_QTY = order_quantity = EKPO-MENGEIf there is history:INVOI_QTY =
    Order_quantity – sum_of_IR + sum_of_IR_reversal, wheresum_of_IR =
         sum_of_GR = sum of EKEB-BPMNG when history is a GR credit (IR:
    EKEB-VGABE =2 & Credit  EKEB-SHKZG = S)sum_of_IR_reversal = sum of
    EKEB-BPMNG when history is a GR debit (IR: EKEB-VGABE =2 & Debit: EKEB-
    SHKZG = S)
    i know one function module me_calculate_history.
    but unable to do the calculations.
    can any one hlp me using this function module for invoice quantity.
    thnking u all.
    regards,
    karan

    Any help my dear frnds.
    regards,
    karan

  • Regarding xml file sequence and sales order sequence not equal

    Hi frnds,
                                     The XML File generates after sorting the line items, the sorting is done alphabetically on material master codes but the when the program converts the XML to Sales orders, the line item numbers does not matches with the line item of the XML File, like to understand how the XML conversion happens and is it possible to keep the same sequence of the XML file?
    Regards,
    Jaya.

    And This is a xml details to read
    <ENV:Envelope TransactionID="234567" xmlns:ENV="schemas-hiwg-org-au:EnvelopeV1.0">
         <ENV:SenderID>ABC</ENV:SenderID>
           <ENV:RecipientID>XYZ</ENV:RecipientID>
           <ENV:DocumentCount>1</ENV:DocumentCount>
         <Documents>
              <PurchaseOrder RecordType="10" xmlns="schemas-hiwg-org-au:PurchaseOrderV2.0">
                     <TradingPartnerID>C42000</TradingPartnerID>
                     <MessageType>ORDERS</MessageType>
                     <VersionControlNo>2.0</VersionControlNo>
                     <DocumentType>220</DocumentType>
                </PurchaseOrder>
           </Documents>     
           <Document_Lines>
              <row>
                   <ItemCode>Nylon Black</ItemCode>
                   <Quantity>2</Quantity>
              </row>
              <row>
                   <ItemCode>Nylon White</ItemCode>
                   <Quantity>3</Quantity>
              </row>
         </Document_Lines>
      </ENV:Envelope>
    But this event is fileted with this result message
    "Mapping from LocalObjectType Envelope to object Type failed."
    I've tried to use ENV:Envelope logical objecttype instead of Envelope. But result is same.
    I hope someone can help me
    Thanks

  • Regarding putting trafic lights in alv report

    Hi frnds,
                     I need to add Traffic lites to my program can any one help me how to do that.
    Below i m providing my code.
    <code>
    *ztest_alv
    *& Report  ZSAMPLEALV3                                                 *
    REPORT  ZSAMPLEALV3
            MESSAGE-ID Z00.
    TABLE DECLARATIONS
    TABLES : EKKO.        "Purchasing Document Header
    CONSTANTS DECLARATIONS
    CONSTANTS : C_EBELN(5) VALUE 'EBELN'.
    DATA DECLARATIONS
    DATA : V_FLAG,        "For Select Status
           V_DATA(50).    "To Store Data
    TYPE DECLARATIONS FOR ALV                                            *
    TYPE-POOLS : SLIS.
    *Type Declarations for Field Catalog for Basic List
    DATA : I_FLDCAT_HEAD  TYPE SLIS_T_FIELDCAT_ALV,
           WA_FLDCAT_HEAD TYPE SLIS_FIELDCAT_ALV.
    *Type Declarations for Field Catalog for Secondary List
    DATA : I_FLDCAT_ITEM  TYPE SLIS_T_FIELDCAT_ALV,
           WA_FLDCAT_ITEM TYPE SLIS_FIELDCAT_ALV.
    *Type Declarations for Displaying Images on Basic Grid
    DATA : I_COMMENT  TYPE SLIS_T_LISTHEADER,
           WA_COMMENT TYPE SLIS_LISTHEADER.
    *Type Declarations for Displaying Images on Secondary Grid
    DATA : I_COMMENT_SEC  TYPE SLIS_T_LISTHEADER,
           WA_COMMENT_SEC TYPE SLIS_LISTHEADER.
    *Type Declarations for ALV Events for Basic Grid
    DATA : I_EVENTS TYPE SLIS_T_EVENT,
           WA_EVENT LIKE LINE OF I_EVENTS.
    *Type Declarations for ALV Events for Secondary Grid
    DATA : I_EVENTS_SEC TYPE SLIS_T_EVENT,
           WA_EVENT_SEC LIKE LINE OF I_EVENTS.
    *Type Declarations for Layout Design
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    *Type Declarations for Linking the fields
    DATA : WA_KEYINFO TYPE SLIS_KEYINFO_ALV.
    Type declarations for coloring field
    DATA : wa_color type LVC_S_SCOL.
    DATA: IT_COLOR TYPE TABLE OF LVC_S_SCOL.
    INTERNAL TABLE DECLARATIONS
    *--Internal Table for Basic List
    DATA : BEGIN OF IT_FINAL_BAS OCCURS 0,
             EBELN LIKE EKKO-EBELN,        "Purchasing Document Number
             BUKRS LIKE EKKO-BUKRS,        "Company Code
             AEDAT LIKE EKKO-AEDAT,        "Date on which the record was created
             EKORG LIKE EKKO-EKORG,        "Purchasing Organization
             EKGRP LIKE EKKO-EKGRP,        "Purchasing group
             COLOR(3) ,                     "For applying color
           END OF IT_FINAL_BAS.
    *--Internal Table for Secondary List
    DATA : BEGIN OF IT_FINAL_SEC OCCURS 0,
             EBELN LIKE EKPO-EBELN,        "Purchasing Document Number
             MATNR LIKE EKPO-MATNR,        "Material Number
             TXZ01 LIKE EKPO-TXZ01,        "Material Desc
             WERKS LIKE EKPO-WERKS,        "Plant
             LGORT LIKE EKPO-LGORT,        "Location
             MATKL LIKE EKPO-MATKL,        "Material Group
             MENGE LIKE EKPO-MENGE,        "Purchase order quantity
             MEINS LIKE EKPO-MEINS,        "Order unit
             NETPR LIKE EKPO-NETPR,        "Net price in purchasing document (in document currency)
             NETWR LIKE EKPO-NETWR,        "Net order value in PO currency
             DUMMY LIKE ICON-ID,           "For placing Icon
             COLOR(3) ,                     "For applying color
           END OF IT_FINAL_SEC.
    *--Internal Table for Secondary List with selected records
    DATA : BEGIN OF I_ITEM_DISPLAY OCCURS 0,
             EBELN LIKE EKPO-EBELN,        "Purchasing Document Number
             MATNR LIKE EKPO-MATNR,        "Material Number
             TXZ01 LIKE EKPO-TXZ01,        "Material Desc
             WERKS LIKE EKPO-WERKS,        "Plant
             LGORT LIKE EKPO-LGORT,        "Location
             MATKL LIKE EKPO-MATKL,        "Material Group
             MENGE LIKE EKPO-MENGE,        "Purchase order quantity
             MEINS LIKE EKPO-MEINS,        "Order unit
             NETPR LIKE EKPO-NETPR,        "Net price in purchasing document (in document currency)
             NETWR LIKE EKPO-NETWR,        "Net order value in PO currency
             DUMMY LIKE ICON-ID,           "For placing Icon
             COLOR(3) ,                     "For applying color
           END OF I_ITEM_DISPLAY.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-H01.
    SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) TEXT-003.
    PARAMETERS: P_DISP RADIOBUTTON GROUP RAD1 DEFAULT 'X'.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) TEXT-005.
    PARAMETERS: P_UPD RADIOBUTTON GROUP RAD1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    Event : INITIALIZATION
    INITIALIZATION.
      MOVE 'Developed by'(001) TO V_DATA.
    Event : AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      PERFORM VALIDATE_EBELN.
    Event : START-OF-SELECTION
    START-OF-SELECTION.
    *--Getting the Data
      PERFORM GET_DATA.
    *--Generating the Field catalog for basic and secondary grid
      PERFORM GET_FLDCAT.
    *--Generating the Layout for basic and secondary grid
      PERFORM GET_LAYOUT.
    *--Generating the key infor to link Basic grid to Secondary grid
      PERFORM GET_KEYINFO.
    *--Generating the Events for Basic and Secondary Grid
      PERFORM GET_EVENTS.
    *--Displaying data only
      IF P_DISP = 'X'.
    PERFORM DISPLAY_DATA.
    ELSE .
    PERFORM UPDATE_DATA.
    ENDIF.
    Event : END-OF-SELECTION
    END-OF-SELECTION.
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_DATA .
    IF V_FLAG EQ 'X'.
    *--Generating Basic List
        PERFORM DISP_BASIC_LIST.
    ELSE.
    IF SY-SUBRC NE 0.
        MESSAGE I010 WITH 'No Data Found To Display'(002).
      ENDIF.
    ENDFORM.                    " DISPLAY_DATA
         SUB-ROUTINES
    *&      Form  VALIDATE_EBELN
          Validating the PO No
    FORM VALIDATE_EBELN .
      SELECT EBELN
      UP TO 1 ROWS
      INTO (EKKO-EBELN)
      FROM EKKO
      WHERE EBELN IN S_EBELN.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        MESSAGE I010 WITH 'Invalid PO No'(003) S_EBELN-LOW 'To'(004) S_EBELN-HIGH.
      ENDIF.
    ENDFORM.                    " VALIDATE_EBELN
    *&      Form  GET_DATA
          Getting Basic List and Secondary List Data
    FORM GET_DATA .
    *--Getting Basic List Data
      SELECT EBELN                  "PO No
             BUKRS                  "Company Code
             AEDAT                  "Creation Date
             EKORG                  "Purch Org
             EKGRP                  "Purch Group
       INTO TABLE IT_FINAL_BAS
       FROM EKKO
       WHERE EBELN IN S_EBELN.
    *--Getting Secondary List Data
      IF SY-SUBRC EQ 0.
        SELECT EBELN                "PO No
               MATNR                "Material No
               TXZ01                "Material Desc
               WERKS                "Plant
               LGORT                "Location
               MATKL                "Material Group
               MENGE                "PO Qty
               MEINS                "Unit
               NETPR                "Net Price
               NETWR                "Net Value
          INTO TABLE IT_FINAL_SEC
          FROM EKPO
          WHERE EBELN IN S_EBELN.
      ENDIF.
    IF SY-SUBRC EQ 0.
       V_FLAG = 'X'.
    ELSE.
       V_FLAG = SPACE.
    ENDIF.
    ENDFORM.                    " GET_DATA
    *&      Form  GET_FLDCAT
          Generating the Field Catalog
    FORM GET_FLDCAT .
    *--Generating the Field Catalog for Basic List
    WA_FLDCAT_HEAD-REPTEXT_DDIC = 'Status'.
    WA_FLDCAT_HEAD-FIELDNAME = 'LIGHT'.
    WA_FLDCAT_HEAD-COL_POS = '1'.
    WA_FLDCAT_HEAD-JUST = 'C'.
    WA_FLDCAT_HEAD-OUTPUTLEN = '4'.
    WA_FLDCAT_HEAD-ICON           = 'X'.
    APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
    CLEAR WA_FLDCAT_HEAD .
      WA_FLDCAT_HEAD-FIELDNAME = 'EBELN'.
      WA_FLDCAT_HEAD-COL_POS = '2'.
      WA_FLDCAT_HEAD-JUST = 'C'.
      WA_FLDCAT_HEAD-OUTPUTLEN = '12'.
      WA_FLDCAT_HEAD-SELTEXT_M  = 'PO Number'(006).
      WA_FLDCAT_HEAD-DDICTXT = 'M'.
      WA_FLDCAT_HEAD-REF_TABNAME = ' '.
      WA_FLDCAT_HEAD-HOTSPOT = 'X'.
      APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
      CLEAR WA_FLDCAT_HEAD .
      WA_FLDCAT_HEAD-FIELDNAME = 'BUKRS'(007).
      WA_FLDCAT_HEAD-COL_POS = '3'.
      WA_FLDCAT_HEAD-OUTPUTLEN = '12'.
      WA_FLDCAT_HEAD-SELTEXT_M = 'Company Code'(008).
      WA_FLDCAT_HEAD-DDICTXT = 'M'.
      APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
      WA_FLDCAT_HEAD-FIELDNAME = 'AEDAT'(009).
      WA_FLDCAT_HEAD-COL_POS = '4'.
      WA_FLDCAT_HEAD-OUTPUTLEN = '10'.
      WA_FLDCAT_HEAD-SELTEXT_M = 'PO Date'(010).
      WA_FLDCAT_HEAD-DDICTXT = 'M'.
      APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
      WA_FLDCAT_HEAD-FIELDNAME = 'EKORG'(011).
      WA_FLDCAT_HEAD-COL_POS = '5'.
      WA_FLDCAT_HEAD-OUTPUTLEN = '6'.
      WA_FLDCAT_HEAD-SELTEXT_M = 'PO Org'(012).
      WA_FLDCAT_HEAD-DDICTXT = 'M'.
      WA_FLDCAT_HEAD-EDIT = 'X'.
      APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
      WA_FLDCAT_HEAD-FIELDNAME = 'EKGRP'(013).
      WA_FLDCAT_HEAD-COL_POS = '6'.
      WA_FLDCAT_HEAD-OUTPUTLEN = '8'.
      WA_FLDCAT_HEAD-SELTEXT_M = 'PO Group'(014).
      WA_FLDCAT_HEAD-DDICTXT = 'M'.
      WA_FLDCAT_HEAD-DO_SUM = 'X'.
      APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
    *--Generating the Field Catalog for secondary List
      WA_FLDCAT_ITEM-FIELDNAME = 'EBELN'.
      WA_FLDCAT_ITEM-COL_POS = '1'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '12'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'PO Number'(006).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
    WA_FLDCAT_ITEM-REF_TABNAME = ' '.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'MATNR'(015).
      WA_FLDCAT_ITEM-COL_POS = '2'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '18'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Item Number'(016).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
    WA_FLDCAT_ITEM-REF_TABNAME = ' '.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'TXZ01'(017).
      WA_FLDCAT_ITEM-COL_POS = '3'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '40'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Item Desc'(018).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'WERKS'(019).
      WA_FLDCAT_ITEM-COL_POS = '4'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '6'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Plant'(020).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'LGORT'(021).
      WA_FLDCAT_ITEM-COL_POS = '5'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '9'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Location'(022).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'MATKL'(023).
      WA_FLDCAT_ITEM-COL_POS = '6'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '10'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Mat Group'(024).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'MENGE'(025).
      WA_FLDCAT_ITEM-COL_POS = '7'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '17'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'PO Qty'(026).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'MEINS'(027).
      WA_FLDCAT_ITEM-COL_POS = '8'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '3'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Unit'(028).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'NETPR'(029).
      WA_FLDCAT_ITEM-COL_POS = '9'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '14'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Net Price'(037).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'NETWR'(030).
      WA_FLDCAT_ITEM-COL_POS = '10'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '16'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Net Value'(031).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
      WA_FLDCAT_ITEM-FIELDNAME = 'DUMMY'(038).
      WA_FLDCAT_ITEM-COL_POS = '11'.
      WA_FLDCAT_ITEM-JUST = 'C'.
      WA_FLDCAT_ITEM-OUTPUTLEN = '3'.
      WA_FLDCAT_ITEM-SELTEXT_M  = 'Status'(039).
      WA_FLDCAT_ITEM-DDICTXT = 'M'.
      WA_FLDCAT_ITEM-ICON = 'X'.
      APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
    ENDFORM.                    " GET_FLDCAT
    *&      Form  DISP_BASIC_LIST
          Generating the Basic List
    FORM DISP_BASIC_LIST .
    **--Applying the color to record in Basic List
        SORT IT_FINAL_BAS BY BUKRS.
         LOOP AT IT_FINAL_BAS.
            IF IT_FINAL_BAS-BUKRS LE '1000'.
              IT_FINAL_BAS-COLOR = 'C21'.
            ELSEIF IT_FINAL_BAS-BUKRS GT '1000' AND IT_FINAL_BAS-BUKRS LE '2000'.
              IT_FINAL_BAS-COLOR = 'C41'.
            ELSEIF IT_FINAL_BAS-BUKRS GT '2000' AND IT_FINAL_BAS-BUKRS LE '3000'.
              IT_FINAL_BAS-COLOR = 'C71'.
            ELSEIF IT_FINAL_BAS-BUKRS GT '3000'.
              IT_FINAL_BAS-COLOR = 'C51'.
            ELSE.
              IT_FINAL_BAS-COLOR = 'C61'.
            ENDIF.
              MODIFY IT_FINAL_BAS INDEX SY-TABIX.
           ENDLOOP.
    *--Generating the Grid output
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = 'ZTEST_ALV'
        I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = ' '
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  =
          I_BACKGROUND_ID                   = 'PLAIN_BACKGROUND'
        I_GRID_TITLE                      =
        I_GRID_SETTINGS                   =
          IS_LAYOUT                         = WA_LAYOUT
          IT_FIELDCAT                       = I_FLDCAT_HEAD
        IT_EXCLUDING                      =
        IT_SPECIAL_GROUPS                 =
        IT_SORT                           =
        IT_FILTER                         =
        IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
        I_SAVE                            = ' '
        IS_VARIANT                        =
          IT_EVENTS                         = I_EVENTS
        IT_EVENT_EXIT                     =
        IS_PRINT                          =
        IS_REPREP_ID                      =
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        IT_ALV_GRAPHICS                   =
        IT_HYPERLINK                      =
        IT_ADD_FIELDCAT                   =
        IT_EXCEPT_QINFO                   =
        I_HTML_HEIGHT_TOP                 =
        I_HTML_HEIGHT_END                 =
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           =
        ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IT_FINAL_BAS
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISP_BASIC_LIST
    *&      Form  GET_EVENTS
          Getting the ALV Events
    FORM GET_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = I_EVENTS
       EXCEPTIONS
         LIST_TYPE_WRONG       = 1
         OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--Calling the User Defined sub-routines for ALV Events
      IF NOT I_EVENTS[] IS INITIAL.
        READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
        WA_EVENT-FORM = 'GENERATE_USERCOMMAND_HEADER'.
        MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
       READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
       WA_EVENT-FORM = 'FRM_TOP_OF_PAGE'.
       MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
        READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'END_OF_LIST'.
        WA_EVENT-FORM = 'GENERATE_USERCOMMAND_FOOTER'.
        MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
        READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
        WA_EVENT-FORM = 'GENERATE_USERCOMMAND3'.
        MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " GET_EVENTS
    *&      Form  GENERATE_USERCOMMAND_HEADER
          Displaying Header-Text and Logo on Grid
    FORM GENERATE_USERCOMMAND_HEADER.
      CLEAR I_COMMENT[].
      WA_COMMENT-TYP = 'H'.
      WA_COMMENT-INFO = 'General Purchase Order Info'(032).
      APPEND WA_COMMENT TO I_COMMENT.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = I_COMMENT
          I_LOGO             = 'ENJOYSAP_LOGO'.
        I_END_OF_LIST_GRID       = 'X'.
    ENDFORM.                    " GENERATE_USERCOMMAND
    *FORM FRM_TOP_OF_PAGE.
    write :/ text-005 intensified on.
    write :/ text-006 , sy-sysid,14 sy-mandt.
    write :/ text-007 , sy-uname.
    write :/ text-008 , sy-datum.
    write :/ text-009 , sy-uzeit.
    skip.
    *ENDFORM.
    *&      Form  GENERATE_USERCOMMAND_FOOTER
          Displaying Footer-Text
    FORM GENERATE_USERCOMMAND_FOOTER .
      CLEAR I_COMMENT[].
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = V_DATA.
      WA_COMMENT-INFO = 'kaka'(033).
      APPEND WA_COMMENT TO I_COMMENT.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = I_COMMENT
         I_LOGO                   = ''
          I_END_OF_LIST_GRID       = 'X'.
    ENDFORM.                    " GENERATE_USERCOMMAND_FOOTER
    *&      Form  GENERATE_USERCOMMAND3
          Getting the F-Code and Calling Secondary List
    -->  P_UCOMM        LIKE SY-UCOMM
    -->  P_SELFIELD     TYPE SLIS_SELFIELD
    FORM GENERATE_USERCOMMAND3 USING P_UCOMM LIKE SY-UCOMM
                                     P_SELFIELD TYPE SLIS_SELFIELD.
       CASE P_UCOMM.
        WHEN '&IC1'.   "DOUBLE CLICK Func-Code
          READ TABLE IT_FINAL_BAS INDEX P_SELFIELD-TABINDEX.
          REFRESH I_ITEM_DISPLAY.
    *--Applying the color to record in Secondary List
          LOOP AT IT_FINAL_SEC WHERE EBELN = IT_FINAL_BAS-EBELN.
            IF IT_FINAL_SEC-NETPR EQ 0.
              IT_FINAL_SEC-DUMMY = '@0A@'.
              IT_FINAL_SEC-COLOR = 'C61'.
            ELSEIF IT_FINAL_SEC-NETPR GT 0 AND IT_FINAL_SEC-NETPR LE 200.
              IT_FINAL_SEC-DUMMY = '@09@'.
              IT_FINAL_SEC-COLOR = 'C41'.
            ELSEIF IT_FINAL_SEC-NETPR GT 200 AND IT_FINAL_SEC-NETPR LE 1000.
              IT_FINAL_SEC-DUMMY = '@08@'.
              IT_FINAL_SEC-COLOR = 'C71'.
            ELSEIF IT_FINAL_SEC-NETPR GT 1000.
              IT_FINAL_SEC-DUMMY = '@6P@'.
              IT_FINAL_SEC-COLOR = 'C51'.
            ENDIF.
              MODIFY IT_FINAL_SEC INDEX SY-TABIX.
            MOVE-CORRESPONDING IT_FINAL_SEC TO I_ITEM_DISPLAY.
            APPEND I_ITEM_DISPLAY.
            CLEAR I_ITEM_DISPLAY.
          ENDLOOP.
    *--Getting the ALV Events of Secondary List
          PERFORM GET_EVENTS_SEC.
    *--Generating the ALV Secondary Grid output
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
            I_INTERFACE_CHECK              = ' '
            I_BYPASSING_BUFFER             =
            I_BUFFER_ACTIVE                = ' '
              I_CALLBACK_PROGRAM             = 'ZTEST'
            I_CALLBACK_PF_STATUS_SET       = ' '
            I_CALLBACK_USER_COMMAND        = ' '
            I_STRUCTURE_NAME               =
              I_BACKGROUND_ID                = 'PLAIN_BACKGROUND'
              IS_LAYOUT                      = WA_LAYOUT
              IT_FIELDCAT                    = I_FLDCAT_ITEM
            IT_EXCLUDING                   =
            IT_SPECIAL_GROUPS              =
            IT_SORT                        =
            IT_FILTER                      =
            IS_SEL_HIDE                    =
            I_DEFAULT                      = 'X'
            I_SAVE                         = ' '
            IS_VARIANT                     =
              IT_EVENTS                      = I_EVENTS_SEC
            IT_EVENT_EXIT                  =
            IS_PRINT                       =
            IS_REPREP_ID                   =
            I_SCREEN_START_COLUMN          = 0
            I_SCREEN_START_LINE            = 0
            I_SCREEN_END_COLUMN            = 0
            I_SCREEN_END_LINE              = 0
          IMPORTING
            E_EXIT_CAUSED_BY_CALLER        =
            ES_EXIT_CAUSED_BY_USER         =
            TABLES
              T_OUTTAB                       = I_ITEM_DISPLAY
            EXCEPTIONS
              PROGRAM_ERROR                  = 1
              OTHERS                         = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " GENERATE_USERCOMMAND3
    *&      Form  GET_LAYOUT
          Generating the Layout
    FORM GET_LAYOUT .
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.           "OPTIMIZING FIELD WIDTH
      WA_LAYOUT-ZEBRA = 'X'.                       "PUTTING ZEBRA COLORS
      WA_LAYOUT-INFO_FIELDNAME = 'COLOR'(034).     "APPLYING COLORS TO ROWS
    ENDFORM.                    " GET_LAYOUT
    *&      Form  GET_KEYINFO
          Getting Key info
    FORM GET_KEYINFO .
    *--Linking the Basic List to Secondary List
      WA_KEYINFO-HEADER01 = C_EBELN.
      WA_KEYINFO-ITEM01 = C_EBELN.
    ENDFORM.                    " GET_KEYINFO
    *&      Form  GET_EVENTS_SEC
          Getting Secondary List Events
    FORM GET_EVENTS_SEC .
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = I_EVENTS_SEC
       EXCEPTIONS
         LIST_TYPE_WRONG       = 1
         OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--Calling user-defined sub-routines for Secondary List
      IF NOT I_EVENTS_SEC[] IS INITIAL.
        READ TABLE I_EVENTS_SEC INTO WA_EVENT_SEC WITH KEY NAME = 'TOP_OF_PAGE'.
        WA_EVENT_SEC-FORM = 'GENERATE_USERCOMMAND_H_SEC'.
        MODIFY I_EVENTS_SEC FROM WA_EVENT_SEC INDEX SY-TABIX.
        READ TABLE I_EVENTS_SEC INTO WA_EVENT_SEC WITH KEY NAME = 'END_OF_LIST'.
        WA_EVENT_SEC-FORM = 'GENERATE_USERCOMMAND_F_SEC'.
        MODIFY I_EVENTS_SEC FROM WA_EVENT_SEC INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " GET_EVENTS_SEC
    *&      Form  GENERATE_USERCOMMAND_H_SEC
       Displaying Header-Text and Logo on Grid For Secondary List
    FORM GENERATE_USERCOMMAND_H_SEC.
      CLEAR I_COMMENT_SEC[].
      WA_COMMENT_SEC-TYP = 'H'.
      WA_COMMENT_SEC-INFO = 'Purchase Order Info'(035).
      APPEND WA_COMMENT_SEC TO I_COMMENT_SEC.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = I_COMMENT_SEC
          I_LOGO             = 'ENJOYSAP_LOGO'.
        I_END_OF_LIST_GRID       = 'X'.
    ENDFORM.                    " GENERATE_USERCOMMAND_H_SEC
    *&      Form  GENERATE_USERCOMMAND_F_SEC
          Displaying Footer-Text for Secondary List
    FORM GENERATE_USERCOMMAND_F_SEC.
      CLEAR I_COMMENT_SEC[].
      WA_COMMENT_SEC-TYP = 'S'.
      WA_COMMENT_SEC-KEY = V_DATA.
      WA_COMMENT_SEC-INFO = 'kak1'(036).
      APPEND WA_COMMENT_SEC TO I_COMMENT_SEC.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = I_COMMENT_SEC
         I_LOGO                   = ''
          I_END_OF_LIST_GRID       = 'X'.
    ENDFORM.                    " GENERATE_USERCOMMAND_F_SEC
    *&      Form  UPDATE_DATA
          text
    -->  p1        text
    <--  p2        text
    *form UPDATE_DATA .
    *CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = I_GRID_TITLE
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
      IS_LAYOUT                         = IS_LAYOUT
      IT_FIELDCAT                       = IT_FIELDCAT
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
      IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      IT_EVENTS                         = IT_EVENTS
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
    TABLES
       t_outtab                          = t_outtab
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *endform.                    " UPDATE_DATA
    </code>
    regards,
    sanjay

    Hi,
    Please refer to the code below:
    REPORT ALV_LIGHTS.* Published at SAPTechnical.COMTYPES: BEGIN OF ty_alv,
            lights(1) TYPE c, "Exception, Holding the value of the lights
            text(20) TYPE c,  "some text
           END OF ty_alv.DATA: gs_alv TYPE ty_alv,
          gt_alv TYPE TABLE OF ty_alv,
          gr_alv TYPE REF TO cl_salv_table,
          gr_columns TYPE REF TO cl_salv_columns_table.START-OF-SELECTION.
      gs_alv-lights = '1'.    "Color red
      gs_alv-text = 'RED SIGNAL'.
      APPEND gs_alv TO gt_alv.  gs_alv-lights = '2'.    "Color yellow
      gs_alv-text = 'YELLOW SIGNAL'.
      APPEND gs_alv TO gt_alv.  gs_alv-lights = '3'.    "Color green
      gs_alv-text = 'GREEN SIGNAL'.
      APPEND gs_alv TO gt_alv.  CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = gr_alv
        CHANGING
          t_table      = gt_alv.  gr_columns = gr_alv->get_columns( ).  gr_columns->set_exception_column( value = 'LIGHTS' ).  CALL METHOD gr_alv->display.
    Thanks,
    Sriram Ponna.

  • Regarding editable alv

    Hi all,
              Frnds i am working in editable alv using function modules not object oriented abap.
    i m trying to edit a Field(MATNR ) in my output list and finally update it with changed values in the DB table.
    But i m getting syntax error like
    "the work area i_final is not alligned properly
    below i m providing my code.
    <code>
    *& Report  ZEDITABLE_ALV1
    REPORT  ZEDITABLE_ALV1.
    TABLES: vbak,vbap.
    TYPE-POOLS: slis. "ALV Declarations
    data: BEGIN OF i_final occurs 0,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          matnr like vbap-matnr,
          erdat like vbap-erdat,
    END OF i_final.
    DATA : C_X(1) TYPE C VALUE 'X',
           C_FC_MODIFY(6) TYPE C VALUE 'MODIFY'.
    *DATA: i_final TYPE STANDARD TABLE OF T_FINAL with header line.
         i_temp type standard table of T_FINAL with header line.
    *wa_final like line of i_final.
    *DATA:i_final LIKE vbap OCCURS 0.
    *DATA:wa_final LIKE vbap.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    *•     Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    fieldcatalog-fieldname = 'VBELN'.
    fieldcatalog-seltext_m = 'sales order'.
    fieldcatalog-col_pos = 0.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'ERDAT'.
    fieldcatalog-seltext_m = 'date'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'material no.'.
    fieldcatalog-col_pos = 2.
    fieldcatalog-edit = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'POSNR'.
    fieldcatalog-seltext_m = 'line item no.'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-FIELDNAME = 'REC_SEL'.
    fieldcatalog-NO_OUT = C_X.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    *•     Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
         gd_layout-totals_only = 'X'.
         gd_layout-f2code = 'DISP'. "Sets fcode for when double
         "click(press f2)
         gd_layout-zebra = 'X'.
         gd_layout-group_change_edit = 'X'.
         gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    *•     Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'GUI_STAT'
    *i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    *it_special_groups = gd_tabgroup
    *it_events = it_events
    i_save = 'X'
    *is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " DISPLAY_ALV_REPORT
    **& Form DATA_RETRIEVAL
    *•     Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    *SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
    *INNER JOIN vbap AS b ON avbeln = bvbeln
    *INTO TABLE i_final WHERE a~vbeln = b~vbeln.
    select VBELN ERDAT MATNR POSNR up to 10 rows from vbap into corresponding fields of  table i_final.
    ENDFORM. " DATA_RETRIEVAL
    *•     FORM GUI_STAT *
    *•     --> RT_EXTAB *
    FORM gui_stat USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'MODIFY' EXCLUDING rt_extab.
    ENDFORM.
    *•     FORM USER_COMMAND *
    *•     --> U_COMM *
    *•     --> RS_SELFIELD *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    DATA:selfield TYPE slis_selfield.
    *RS_SELFIELD-REFRESH = C_X.
    CASE u_comm.
    *IF U_COMM = C_FC_MODIFY.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    *READ TABLE I_TEMP WITH KEY VBELN = I_FINAL-VBELN.
    *IF SY-SUBRC = 0.
    i_final-matnr = vbap-matnr.
    *MODIFY I_final INDEX SY-TABIX.
    *ENDIF.
    ENDLOOP.
    *ENDIF.
    MODIFY VBAP FROM TABLE i_final.
    IF SY-SUBRC = 0.
    COMMIT WORK AND WAIT.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    ENDIF.
    *append i_final.
    *it_temp = i_final.
    *append it_temp.
    **UPDATE sflight FROM TABLE sflight_tab.
    *ENDLOOP.
    *update vbap from table i_final.
    *IF sy-subrc = 0.
    *MESSAGE s000(0) WITH 'records updated successfully'.
    *ENDIF.
    ENDCASE.
    ENDFORM.
    </code>
    Frnds plz help me in this regard.
    Thanks,
    satya

    Try something like this...ur code was not clear..i have done something u can understand.
    First check that u r not trying to update the primary key field.
    first before updating.
    Before updating select the record u r going to update from the main table.
    select single * from VBAP where <pass the key values>.
    if sy-subrc = 0.
    move the rest of the values to the table header except the key values.
    vbap-<field1> = value1.
    vbap-<field2> = value2.
    after moving the values.
    update <table>.
    if sy-subrc = 0.
    commit work.
    endif.
    data:st_vbap type vbap.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    select single * from vbap where vbeln = I_FINAL-VBELN.
    move-corresponding i_final to vbap.
    update vbap.
    if sy-subrc = 0.
    commit work.
    wk_cnt = wk_cnt + 1.
    endif.
    at last.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    endat.
    endloop

  • Error while uploading data in SAP (me01)using LSMW

    Hi All,
    I am using LSMW for the first time.
    I am trying to upload data to the Source List transaction (me01) using batch input recording. I created a new recording through LSMW itself. My source structure consists of 5 fields:
    <b>MATNR C(18)
    WERKS C(4)
    VDATU N(8)
    BDATU N(8)
    LIFNR C(10)
    EKORG C(10)</b>
    Now the problem is when i try to convert the data, it gives me an error saying
    "For type "C",a maximum length specification of 65535 is allowed."
    I have noticed that unlike Direct Input method,
    using batch input does not give any fields in "Maintain Field Mapping & Conversion Rules". So even if I have my fields in my source structure ,there are no fields to which I can map them to.
    I don't know that is how it is when we go with batch input.
    My file contain data in following order:
    DANGEROUS GOODS,ABBY,20060801,20060831,30010,TEST
    Pls help me to solve this problem.

    Hi Swapna!
    You get such an error message, when define a constant and forget the second ':
    g_werks = '1000.  "wrong
    g_werks = '1000'.  "correct
    In general: a batch input recording can have fixed values and some variables. You need to define, which fields you like to fill with a variable. Go to the overview of the recordings, open the recording in change mode and assign some variable names to the according batch lines.
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/76/a05b69e8a411d1b400006094b944c8/frameset.htm">Editing batch input recordings</a>
    Follow the help for the following steps of structure assignments.
    Regards,
    Christian

  • Error when creating a source of supply list via me01 and/otr me05

    Dear expert,
    We use SAP R/3 4.6c release.
    I'm trying to create a source of supply that uses a contract.
    I get an error message 'Object does not exist'.
    When I look at the details of this messsage I see it is
    Message OL 826 
    Diagnosis :
    You tried to create an instance of the object type BUS2053 with the key
    0000000000001026311990. No instance of this kind exists.              
    I have checked SW01 and  regenerated the object type BUS2053. The generated object looks ok, but when I test it it still comes up with the same error message.
    What did I forget?

    HI ,
    This is a program error .
    Implement Note 683767.
    According ti this note it will solve the following problem which is similar to your problem
    "When you try to maintain a source list using Transaction ME01, the system generates a termination message with number OL826 'You tried to create an instance of the object type BUS2053 with the key. No instance of this kind exists'. "
    Hope it helps you .
    Regards,
    Anupam

  • User Exit/ BADI for ME01- Sourcelist creation

    Hiii
    We need a place exit/ BADi to do vendor validation before saving soource list in transaction ME01.
    Please provide suitable exit / badi for above requirement.
    Thanks ...in advance.!!
    Regards,
    Nilesh

    EXIT_SAPLMBMP_003     AMPL0001     User subscreen for additional data on AMPL
    EXIT_SAPLMEKO_001     LMEKO001     Extend communications structure KOMK for pricing
    EXIT_SAPLMEKO_002     LMEKO002     Extend communications structure KOMP for pricing
    EXIT_SAPLMEQR_001     LMEQR001     User exit for source determination
    EXIT_SAPLMEQR_001     LMEQR001     User exit for source determination
    EXIT_SAPLQBCK_002     QBCK0002     Extended check in procurement

  • Problem regarding Duplicate Material Codes in SAP

    Dear Xperts,
    In our manufacturing plant,we are not using Split Valuation for same materials procured either from the domestic or from the imported Vendor.Even they are not using the same for the materials received through free of cost or through proper payment process.They are using two material codes and for this data redundancy occurred.Now they want to club the same into one material code but do not want to use Split Valuation till now.
    They want the following:
    1. For domestic Vendor they will follow Purchae Order.
    2. For international Vendor they will follow Schedule Agreement.
    3. They want only Delivery Schedule to be generated through MRP.No Purchase Requisition will be generated.
    But how to proceed.Is it possible?
    Plz advice.
    Regards,
    Soumick

    HI,
    But is it possible to generate only Delivery Schedules thru MRP?Means not to generate PR if we use both PO and SA for same material but for different Vendors?
    PR not generated for scheduling agreement only schedule line will generated as per define schedule in scheduling agreement
    ME31L = to Create SA document type LA or LPA
    Me32L = to change SA
    ME38 = to maintain delivery schedule
    assign scheduling agreement in source list ME01 and select indicator 2 MRP relevant and in material master in purchasing view select JIT indicator
    MIGO = to enter GR against SA
    MIRO = to enter IR against SA
    check following link
    [MRP To Generate SCHEDULE LINES for Scheduling Agreement;
    Regards
    Kailas Ugale

  • Regarding the Java version for  installation of ECC6.0

    Hi frnds
    When i tried to install ECC6.0 abap + java system with version j2sdk-1_4_2_13-windows-i586-p.exe,  igot stuck up with errors.My dear friends please suggest me which version should i use and from where to down load.Please help me out.
    From
    Siva

    Hi Siva,
    perhaps it is better to aks your question at one of these
    forums
    Java Development
    SAP NetWeaver Application Server
    SAP on Microsoft Windows
    Regards
    Bernd

  • Hi frnds...im new 2 BI can some one explain me basics in BI...

    HI frnds..
      I jst started BW/Bi training..can someone explain me basics in BW.. like
    what are dimesion id's n surrogate id's??
    what is extended schema???
    what is master data??
    how master data is stored??
    what is datasource,infosource,infopackage,application component,transfer rules,update rules....have much confusion..
    please can some one clear it...

    First of all this is not the correct forum for your questions. This forum handles questions regarding the BusinessObjects on Demand offering.
    Secondly it is not realistic to expect an answer to ALL those questions in a forum. I would suggest either to buy book about SAP Netweaver/BW (Beginner's level) or search for the keywords you are refering to either in SDN or in the Internet. There are some SAP BW tutorilas available out there.
    eg.
    Step By Step BW Exercise
    http://searchsap.techtarget.com/tutorial/SAP-NetWeaver-BI-training-tutorial
    Regards,
    Stratos

Maybe you are looking for

  • Create PDF from a Word document within Acrobat

    Hi! I am having trouble to create a PDF from a Word document within Acrobat itself, and not by using PDF Maker in Word. When I try to create a PDF using Acrobat, it gives me the choice to choose any Office format file, but Word format doesn't appear.

  • Analysis

    HI Where we see the age wise analysis for Customer & vendor ( Desending order)

  • Found Dead Multi-Threaded Server Error!!!

    I am in the process of testing an application based on EJBs deployed on an Oracle 8.1.5 database. Some times the whole instance chashes without any obvious reason. The error reported in the Alert file is "found dead multi-threaded server 'SOOO',pid(8

  • Reverting Mavericks RecoveryHD partition back to the original OS version shipped

    Hi all, I'm trying to piece together various bits of information acquired through forums, web searches, etc. in the hopes of understanding the end result a bit better. I currently have Mavericks installed in a VM - default system OS is still Mountain

  • When is Apple going to get it together with iTunes?

    I recently purchased an iPhone and therefore had to install iTunes. Realizing that the only effective way to get my music from my library to my phone is through iTunes, I decided to check it out. I have over 3000 house music CDs that I have been enco