Creating additional customised tabscreen under header data for me21n

hi all.
i have a requirement for adding extra tabscreen (subscreen) undr headr data of me21n purchase requisitions .
and other thing is i want to know how we can raise an eror message if the user has filled all data in me21n except in customised tab screen that i am going to create.
waiting for great answwr.
bye.
sita ram,

Hi,
you can find tons of general info BADIs on this forum. So basically go to transaction SE18 and enter name of your BADI - ME_GUI_PO_CUST. Please read carefully documentation. There is button for documentation. In documentation you can find following statement:
The Business Add-In (BADI) ME_GUI_PO_CUST enables you to integrate your own subscreens into the Enjoy purchase order at both eader and item levels.
So it looks like what you need. You have description for each method of BADI in documentation as well.Definitely you will have to implement method SUBSCRIBE. You will define your own screen in this method. Then you have to implement PBO and PAI logic (check methods TRANSPORT_TO_DYNP and TRANSPORT_FROM_DYNP). SAP provides examples for each BADI. You can read the example of BADIs implementation in Goto->Sample Code->Display. These examples are very well commented. I am pasting just example of SUBSCRIBE implementation
DATA: ls_subscriber LIKE LINE OF re_subscribers.
* we want to add a customer subscreen on the item detail tab
  CHECK im_application = 'PO'.
  CHECK im_element     = 'ITEM'.
* each line in re_subscribers generates a subscreen. We add one subscreen in this example
  CLEAR re_subscribers[].
* the name is a unique identifier for the subscreen and defined in this class definition
  ls_subscriber-name = subscreen1.
* the dynpro number to use
  ls_subscriber-dynpro = '0001'.
* the program where the dynpro can be found
  ls_subscriber-program = 'SAPLMEPOBADIEX'.
* each subscreen needs his own DDIC-Structure
  ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
* a label can be defined
  ls_subscriber-label = text-001.
* the position within the tabstrib can be defined
  ls_subscriber-position = 5.
* the height of the screen can be defined here. Currently we suport two screen sizes:
* value <= 7 a sevel line subscreen
* value > 7  a 16 line subscreen
  ls_subscriber-height = 7.
  APPEND ls_subscriber TO re_subscribers.
So basically you will define your new sub screen in this method. Do not forget that the BADI ME_PROCESS_PO_CUST is compulsatory for BADI ME_GUI_PO_CUST.
Cheers

Similar Messages

  • It is necessary to create one header data for each file to be sent to CDFS.

    hi GUYS
    my sce anrio is FILE-XI-PROXY
    REQUIREMENT IS
    SOURCE FILE                      TARGET FILE WILL BE
    H1                                             H1                        H1                    H1
    I1                                               I1                         I2                      I3
    I2                                                F1                        F1                    F1
    I3                                           
    F1
    It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
    Thanks
    NAG

    aa

  • Posting header data for MIGO thru badi

    Hi,
    I'm using badi  ' MB_MIGO_BADI ' for posting header data for the T-Code MIGO.
    I have created an extra tab for supplier details for header data. The details from dis tab should be stored in a ztable.
    I have written the code for the same in the METHOD  'POST DOCUMENT'  of the badi, but m unable to store the data in the ztable. niether is the code for display working.
    kindly help.

    Hi,
    you need to create an attribute where you will store data from your additional screen. In example there is an attribute GS_EXDATA_HEADER with structure MBLNR, MJAHR, BADI_NUMMER. So obviously the point is to enter some number on additional header tab screen. You can see that in the method PAI_HEADER that all data from screen are transferred to this structure and in the method PBO_HEADER are data transferred from internal structure to the screen. So in this internal structure you store the current values of the fields from your additional header tab.  Now when you store material document you want to also store your additional data into database. Until this point you store it only in memory. Hence you prepare a new FM which will store this data to DB and you will call this FM in UPDATE TASK. Here is an example
      CALL FUNCTION 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' IN UPDATE TASK
        EXPORTING
          is_migo_badi_header_fields = gs_exdata_header.
    Once again to summarize it:
    1) Define your own structure to keep additional data as an attribute of BADI implementation class
    2) Pass data from memory to screen and back using methods PBO_HEADER and PAI_HEADER
    3) Store additional data into DB using FM called in UPDATE TASK from method POST_DOCUMENT
    Cheers

  • SAP VBA interfacing - error: FI/CO interface: Inconsistent FI/CO document header data for updating

    Hello,
    Currently I'm working with excel SAP interfacing. For this I am using VBA to call different BAPI functions.
    I have already some interface scripts working, however I have also one which I cannot discover what I'm missing.
    The VBA code is to reach BAPI_ACC_DOCUMENT_POST
    My error is ---> FI/CO interface: Inconsistent FI/CO document header data for updating
    So I'm appealing to you SAP bapi VBA gurus whether you have any ideas how to fix my issue.
    I'm attaching below my code for you to review:
    Option Explicit
    ' Declaration for the necessary objects
    Dim objBAPICortrol, objConnection, objCreateMaterial, objReturn As Object
    Dim objPRFCT, objNTXT, objDTXT As Object
    Dim vLastRow, vRows As Integer
    Dim objMaterial1, objMaterial2, retMess As Object
    Sub Batch()
    ' Getting the last filled Row in Column
    vLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    ' Setting the necessary variables for R/3 connection
    Set objBAPICortrol = CreateObject("SAP.functions")
    Set objConnection = objBAPICortrol.Connection
    objConnection.System = "SYSTEM NAME"
    objConnection.Client = "Client number"
    objConnection.user = "USERNAME"
    objConnection.Password = "PASSWORD"
    objConnection.Language = "EN"
    ' Establish a connection
    If objConnection.logon(0, False) <> False Then
    'MsgBox "Connection Established"
    End If
    On Error Resume Next
    ' Assign the Parameters
    Set objCreateMaterial = objBAPICortrol.Add("BAPI_ACC_DOCUMENT_POST")
    Set objMaterial = objCreateMaterial.Exports.Item("DOCUMENTHEADER")
    Set objMaterial1 = objCreateMaterial.Tables.Item("ACCOUNTGL")
    Set objMaterial2 = objCreateMaterial.Tables.Item("CURRENCYAMOUNT")
    'Set Values
    objMaterial.Value("USERNAME") = "USERNAME"
    objMaterial.Value("HEADER_TXT") = "BAPITEST"
    objMaterial.Value("COMP_CODE") = "0001"
    objMaterial.Value("PSTNG_DATE") = "20140506"
    objMaterial.Value("TRANS_DATE") = "20140506"
    objMaterial.Value("DOC_DATE") = "20140506"
    objMaterial.Value("FISC_YEAR") = "2014"
    objMaterial.Value("DOC_TYPE") = "SA"
    objMaterial.Value("REF_DOC_NO") = "BAPITEST"
    objMaterial.Value("FIS_PERIOD") = "00"
    objMaterial1.Rows.Add
    objMaterial1.Value(1, "ITEMNO_ACC") = "1"
    objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
    objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
    objMaterial1.Value(1, "DOC_TYPE") = "SA"
    objMaterial1.Value(1, "COMP_CODE") = "0001"
    objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111" ---->'profit center is normally having 10CHARS but as there are letters I'm not using zeros at the beginning
    objMaterial1.Value(1, "ITEMNO_ACC") = "2"
    objMaterial1.Value(1, "GL_ACCOUNT") = "0007180000"
    objMaterial1.Value(1, "ITEM_TEXT") = "BAPITEST1"
    objMaterial1.Value(1, "DOC_TYPE") = "SA"
    objMaterial1.Value(1, "COMP_CODE") = "0001"
    objMaterial1.Value(1, "PROFIT_CTR") = "AZ1111"
    objMaterial2.Rows.Add
    objMaterial2.Value(1, "ITEMNO_ACC") = "1"
    objMaterial2.Value(1, "CURRENCY") = "EUR"
    objMaterial2.Value(1, "AMT_DOCCUR") = "-1.00"
    objMaterial2.Value(1, "ITEMNO_ACC") = "2"
    objMaterial2.Value(1, "CURRENCY") = "EUR"
    objMaterial2.Value(1, "AMT_DOCCUR") = "1.00"
    ' Function call
    objCreateMaterial.call
    Set objReturn = objBAPICortrol.Add("BAPI_TRANSACTION_COMMIT")
    objReturn.call
    Set retMess = objCreateMaterial.Tables.Item("RETURN")
    If retMess Is Nothing Then
    MsgBox retMess.Value(1, "MESSAGE")
    End If
    ' Get return parameters & display in excel
    Set objReturn = objCreateMaterial.Tables("RETURN")
    ActiveSheet.Cells(5, 1) = retMess.Value(2, "MESSAGE")
    End Sub

    after some searching I've discovered that once I'm creating next line for accounting document it is not working properly.
    When I debug the BAPI in SE37 after inserting new line it is asking for GL account input, however if I run it using VBA and delete the account from the code, the return message is not giving me any error that GL account is missing.
    I appreciate any ideas.

  • Add additional field in Vendor master data for VAT Reg. No.?

    Add additional field in Vendor master data for VAT Reg. No.?
    Hi I need to add one additional field for other VAT Reg. number in vendor master data FK01, We currently have two field
    Current Settings:
    Country : LFAS-LAND1
    VAT registration no.: LFAS-STCEG
    I need to add one additional field for text information. Is this possible?
    Thanks you very much
    Luis G.

    If you want to add new fields that are not possible from config (check with your consultant) you need to implement BADIs
    In SPRO, go to:
    >Logistics-General
    ->Business Partner
    -->Vendors
    --->Control
    >Adoption of Cusomter's Own Master Data Fields
    and read the documentation provided there.
    You will need to implement following BAPIs
    Processing Master Data Enhancements: VENDOR_ADD_DATA
    Customer Subscreens: VENDOR_ADD_DATA_CS
    I am not aware of any other way to add new fields to Vendor master (however, check with your consultant for config related screen modifications)
    Should you need any further info to implement it, post back (read it thoroughly first, it's quite self-explanatory).
    regards,
    Aabhas

  • Procedure for creating Recording in  LSMW with header data and line item

    Hello Friends,
    I have to do the Initial Upload of Model Service specification using LSMW ( Recording).
    Transaction : ML10
    The problem i am facing is that i have been given 2 files one with HEADER data and the other with LINE ITEM(Service data).
    Can we use the RECORDING method to upload 2 files?
    If not possible how do we proceed.
    Thanks and regards
    Ashish Naik.

    Step-by-Step Procedure:
    Details of the BAPI used in this scenario:
    Business Object: BUS2012
    Method: CreateFromData
    Details of Message Type and Basic IDoc Type:
    Message Type: PORDCR
    Basic IDoc Type: PORDCR02
    Letu2019s have a look at the BAPI first, before proceeding to the LSMW:
    1.     Go to Transaction BAPI
    2.     Click on Search Button
    3.     Enter the value u201CBUS2012u201D and select u201CObj.type(Technical Object Nameu201D
    4.     Press ENTER
    5.     Following screen appears:
    6.     On the left side of the screen, Expand the u201CPurchaseOrderu201D.
    7.     Select u201CPurchaseOrderu201D and double-click on the same for details.
    Building LSMW using BAPI:
    1. Go to Transaction LSMW.
    2. Enter the Project, Subproject and Object information and click on CREATE.
    3. Enter the descriptions for Project, Subproject and Object as prompted.
    4. Now select Settings à IDoc Inbound Processing
    5. u201CIDoc Inbound Processingu201D screen appears. Enter the required details as shown below:
    6. Click on u201CActivate IDoc Inbound Processingu201D.
    7. Click on u201CYesu201D when prompted for u201CActivate IDoc Inbound?u201D
    8. Hit on u201CBacku201D to return to the main screen.
    9. Click on Continue (F8). Following Screen appears:
    10. Select the Step 1 u201CMaintain Object Attributesu201D and select u201CExecuteu201D.
    11. Select the radio button u201CBusiness Object Methodu201D and enter the following details:
    Business Object: BUS2012
    Method: CreateFromData
    Hit ENTER
    12. Save and click on BACK button. Following information message is displayed.
    13. Now select step 2 u201CMaintain Source Structuresu201D and click u201CExecuteu201D.
    14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
    Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on u201CCreateu201D again to create the child structure. Following popup appears:
    Select u201CLower Levelu201D and click on Continue. Enter the Item data structure name.
    Click Save and hit BACK button to go to the main screen.
    15. Select step 3 u201CMaintain Source Fieldsu201D and hit execute.
    16. Enter the fields as shown below:
    17. Click SAVE and return to main screen.
    18. Select step 4 u201CMaintain Structure Relationsu201D and click Execute.
    Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
    Select HEADERDATA and hit ENTER
    Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
    Click Save and return to main screen.
    19. Select the step u201CMaintain Field Mapping and Conversion Rulesu201D and click on execute. Maintain the Field Mapping as seen below:
    20. Select step 7 u201CMaintain Source Filesu201D and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
    Save and return to main screen.
    21. Select the step u201CAssign Filesu201D and click on Execute.
    Assign the file provided to the source structure. Here the same file is provided for both the structures.
    Save and return to the main screen.
    22. Select the step u201CRead Datau201D and click on Execute.
    Click on Execute.
    Return to the main screen.
    23. Select the step u201CDisplay read datau201D and click on execute.
    Click on the structure name to get the field level values.
    24. Return to main screen and now select u201CConvert Datau201D.
    25. Return to the main screen and select u201CDisplay Converted datau201D.
    26. Return to main screen and select u201CStart IDoc generationu201D.
    27. Now select the step u201CStart IDoc Processingu201D on the main screen.
    28. Return to main screen and click on u201CCreate IDoc overviewu201D. Here the data record and status records of the IDoc could be viewed:
    Check this. This may help

  • What is the best way to create a SSRS Report with Header Data and its associated child data

    So I have Member Information...Member ID...Member Addressing...etc.. I want to display this in the top part of the report like...
    Member Name:
    Member ID:
    Member Address Line 1:
    And then below I want to report on all the claims associated with a Member ID that is chosen by the Parameter. Obviously the Claim Data will be in Table format. Do I necessarily have to associate the Member Information with the Claim Information or simply
    use the same parameter? And what is the best Toolbox item to use to display the Member Information on top?
    Any help or guidance is greatly appreciated by this newbie.
    Thanks for your review and am hopeful for a reply.
    ITBobbyP

    Hi ITBobby,
    According to your description, you want to display all Claim Data for each Member. Right?
    In Reporting Services, we can use a table to display those Claim Data and make them group on Member ID. If you want to display the Member Information, we can put the data fields on parent group level. Then we can use create a parameter to filter the Member
    ID we need. We have tested this scenario in our local environment. Here are steps and screenshots for your reference:
    1. Create a DataSet(DataSet1) which contains the data fields of Member and Claim.
    2. Create a table and drag the Claim data into the table.
    3. In Row Group. Right click on Details and add a parent group.
    4. Select Member_ID in Group by.
    5. Right click on the textbox of Claim data. Select Insert Row->Outside of Group-Above. Drag the MemberName into the inserted row.
    6. In Report Data, right click on Parameter-> Add Parameter.
    7. Type Member_ID in Name and Prompt, select allow multiple values.
    8. In Available Values, select get data from a query. Choose DataSet1, select Member_ID in values and label. You can also set this in Default Values if you need.
    9. Save and preview.
    Reference:
    Understanding Groups (Report Builder and SSRS)
    Report Parameters (Report Builder and Report Designer)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • RECN: Conditions Tab: Header data for second section not appearing

    Hello,
    Need your kind advise please. I have entered a contract successfully. The contract type is Pay:Rates Payment. The contract has been successfully saved.
    The problem comes when I am trying to display the contract. Here is what's happening sequentially:
    Procedure 1
    1.  I am using TCode RECN and keying in the contract number.
    2. Upon pressing Enter, the General Data tab of the contract is opening.
    3. I am clicking on the icon to change the status from 'display' to 'change'. The mode successfully becomes the 'change mode'.
    4. I am clicking on the Conditions tab and I can see that the screen shows two sections. The top section shows the various conditions that I have created. The bottom section shows the details of the condition for the line item selected from the top section.
    5. I am making the necessary changes and successfully saving the changes made to the contract. Then I am pressing F3 and coming back to the main RECN screen.
    BUT:
    An error occurs when I modify the above procedure slightly.
    Procedure 2
    1. When I am entering the contract once more, the first screen that is opening is the Conditions tab of the contract (quite naturally as this was the last screen that i used just now).
    2. When I am then clicking on the icon to change the status from display to 'change', the system is issuing an error message "Please fill all the mandatory fields".
    3. Upon close examination i am finding that in the bottom section of the Conditions Tab (which is supposed to show the details of the condition on which the cursor has been selected in the top section) the field just above the 5 tabs (ie. Condition, Terms, Calculation, Distribution, Memo) is not populating with the name of the condition on which the cursor has been selected in the top section.
    4. Since this field is a mandatory field, the system naturally throws the error "fill up all mandatory fields".
    The point to be noted is that this field gets perfectly populated when i am following the procedure 1. But in the same contract, this field doesnt get populated and throws the error message when I am following the Procedure 2.
    Request you to please help me understand why in the procedure 2, the field is not getting populated.
    Regards.

    Hello Veman,
    Many thanks for the kind response. However in my case the problem is that when I am trying to go into the 'change' mode for an existing record (which has already been once successfully saved), it is STILL throwing the error message 'fill up all mandatory fields'. The only way to come out of the screen is to press the 'cancel' button.
    What is even more funny is that when I am trying to enter the contract directly using the menu RE Cntract - Change from the first RECN screen, then there is no problem coming.
    My question is WHY is the system throwing that error message when clearly there is no error existing in the record. I believe this will be a programming error. The problem that i am referringto matches very closely to the solution provided vide note number 1291666. The reason why I cant apply this note is because my SAP release is 600 whereas this remedy is for 602, 603 ans 604.
    Regards,
    Suvarghya Dutta

  • What table holds the underlying metric data for Tablespace Free Space (MB)?

    10.2.0.4; Windows 64bit
    I'm assuming it's in the SYSMAN schema? I can view it in DBConsole, and can see the Avergae, Low & High values for the last 31days - but want to query the raw data itself.
    Cheers
    Gary

    Check out the Reference Manual: DBA_HIST_TBSPC_SPACE_USAGE
    I suspect the averages and such are derived values in Oracle's queries.
    Edited by: Centinul on Jul 12, 2012 11:08 AM

  • Creating 2 line space under header

    It seems simple, but I can't figure it out. How can I create a space (preferably 2 lines) below the header before text is entered?

    Increase the Top margin dimension.
    That will work on every page. If you only want to increase the spacing on the first page, increase the "Before" margin in the Layout Inspector, Layout Tab.
    Jerry

  • New Tab on header level for me21n/me22n/me23n

    Hi Friends
    i have created a new tab on the me21n/me22n/me23n  header level using the exit
    MM06E005 , The tab is displayed but i am not unable to udate the records into the
    EKKO  Table whereas i have added my field in the include of  EKKO  CL_EKKODB
    Kindly somebody help me with elaborated steps  .
    Thanks & Regards
    Digvijay Rai

    Hi Digvijay,
    Once the data is entered on the screen ..code is written to update the table ie...
    flow of data from custom screen for header is OK..but for display and change we need to
    import the data in a similar manner to the customer subscreen or the tab added in header level
    As you can see the following 3...code must be done in EXIT_SAPMM06E_006/007 to fetch data to customer subscreen for display/change actions..use 006/007 for PBO/PAI actions..
    EXIT_SAPMM06E_006   Export data to customer subscreen for header(PBO)....INCLUDE ZXM06U36
    EXIT_SAPMM06E_007   Export data to customer subscreen for header(PAI)....INCLUDE ZXM06U38 .
    EXIT_SAPMM06E_008   Import data from customer subscreen for header
    Pls check and revert..in addition
    go to smod->MM06E005-> "documentation" -> Display to read more on documentation about data flows and exits used for it
    Hope it helps
    Regards
    Byju

  • Idoc Receiver - Header Data does not update

    Hi there
    I have an Idoc receiver in a scenario where I send a Idoc from a file to the R/3 system. My config is all fine but the Idoc status in we19 shows red. My Header data for the idoc is incorrect. The idoc is WALREQ01. In my Message Mapping Im setting the SDNPOR, SDNPRT, SDNPRN, RCVPOR, RCVPRN to the correct values and the I activate the scenario but in we19 it still shows the incorrect idoc header. It does however change the idoc segment data, just not the header. Is there maybe some other place I have to set the Idoc header data?
    Thanx,
    Jan

    Hi Jan,
    From help.sap:
    Apply Control Record Values from Payload
    If you set the indicator, the conversion of communication parties to the IDoc partner is only possible for systems that are not logical systems.
    If you do not set the indicator, all combinations of communication parties and services are handled as services without party.
    If the IDoc XML structure contains a control record during outbound processing on the Integration Server, it is rejected and created again by the IDoc adapter. If you want to include additional values in the control record, set the indicator and provide an appropriate mapping for the values. See also: Fields of the IDoc Control Record
    http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm
    Carlos

  • JMS Adapter setting the header data of MQ message

    Hi All,
    I need to set the properties in JMS adapter for setting the header data of MQ message.
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    Thanks in advance
    Ravijeet

    Hi All,
    I am stuck in a typical XI issue.......I have a scenario where my input to XI is IDoc and output is xml message going to IBM MQ.
    The IDoc is sending some chineese character which is fine is SXMB_MONI Integration server and also fine in the payload of message monitoring, so feel the message is going fine from XI to MQ.
    But the receiver EDI system which is picking the message from MQ queue says the chinese characters are getting corrupted. They say that you need to set the additional properties in MQ header data
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    How do I do this in communication channel for jms adapter ? How to I set the MQ header data in jms communication channel ?
    Thanks in advance
    Ravijeet
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM

  • Header Data to ALV grid

    Hi Experts,
    How we have to add HEADER DATA for a alv grid display.
    i have to  display some information on the top of the ALV grid  with different font size.
    the informations are:
    Pgm Description
    date: sy-datum.
    Select-option Description: Value given in selection parameter
    Can any one explain how to do this.
    Thanks in Advance,
    Thasneem

    REPORT  ZALV1.
    ******************TABLE DECLARATION***********************************
    TABLES : VBAP.                    " tables declaration
    *****************TYPE POOLS*******************************************
    TYPE-POOLS : SLIS.                " slis type pool
    *****************INTERNAL TABLE DECLARATION***************************
    DATA : BEGIN OF IT_VBAP OCCURS 0,
    " internal table for sales document item
          VBELN LIKE VBAP-VBELN,      " sales document
          POSNR LIKE VBAP-POSNR,      " document item
          ERNAM LIKE VBAP-ERNAM,
          " name of the person who created the object
          ERDAT LIKE VBAP-ERDAT,      " date on which the record was created
          MATNR LIKE VBAP-MATNR.      " material number
    DATA : END OF IT_VBAP.
    DATA : BEGIN OF IT_MARA OCCURS 0, " general material data
           MATNR LIKE MARA-MATNR,     " material number
           ERNAM LIKE MARA-ERNAM,
           " name of the person who created the object
           MATKL LIKE MARA-MATKL,     " material group
           MEINS LIKE MARA-MEINS,     " base unit of measure
           PSTAT LIKE MARA-PSTAT.     " maintainence status
    DATA : END OF IT_MARA.
    ******************VARIABLE
    DECLARATION**********************************
    DATA : REPID LIKE SY-REPID.       " program name
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    " field catalog table for vbap
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA : IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
    " field catalog table for mara
           WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
    DATA: GT_YEVENTS TYPE SLIS_T_EVENT.            " events table
    DATA : XS_EVENT  TYPE SLIS_ALV_EVENT.          " events type
    DATA : GT_PRINT TYPE SLIS_PRINT_ALV.           " print table
    *******************MULTIPLE SELECT INPUT
    PARAMETERS**********************
    SELECT-OPTIONS : S_VBELN FOR VBAP-VBELN.
    " multiple selection for sales document
    ******************INITIALIZATION**************************************
    INITIALIZATION.
      REPID = SY-REPID.
    *******************START OF
    SELECTION************************************
    START-OF-SELECTION.
      PERFORM POP_VBAP.
      " populating the table with document item data
      PERFORM POP_MARA.
      " populating the table with general material data
      PERFORM FIELD_CAT.
      " mapping the fields for the field catalog
      PERFORM EVENTS.                      " using the events
      PERFORM BLOCK_LIST.
      " displaying the data in blocked list
    *&      Form  field_cat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELD_CAT .
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC'.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-OUTPUTLEN = 10.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'POSNR'.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-SELTEXT_L = 'DOC ITEM'.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-OUTPUTLEN = 6.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'ERNAM'.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-SELTEXT_L = 'NAME'.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-OUTPUTLEN = 12.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'ERDAT'.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-SELTEXT_L = 'DATE'.
      WA_FIELDCAT-COL_POS = 4.
      WA_FIELDCAT-OUTPUTLEN = 8.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-TABNAME = 'IT_VBAP'.
      WA_FIELDCAT-SELTEXT_L = 'MAT NO'.
      WA_FIELDCAT-COL_POS = 5.
      WA_FIELDCAT-OUTPUTLEN = 18.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT1-FIELDNAME = 'MATNR'.
      WA_FIELDCAT1-TABNAME = 'IT_MARA'.
      WA_FIELDCAT1-SELTEXT_L = 'MAT NO'.
      WA_FIELDCAT1-COL_POS = 1.
      WA_FIELDCAT1-OUTPUTLEN = 18.
      APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'ERNAM'.
      WA_FIELDCAT1-TABNAME = 'IT_MARA'.
      WA_FIELDCAT1-SELTEXT_L = 'NAME'.
      WA_FIELDCAT1-COL_POS = 2.
      WA_FIELDCAT1-OUTPUTLEN = 12.
      APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'MATKL'.
      WA_FIELDCAT1-TABNAME = 'IT_MARA'.
      WA_FIELDCAT1-SELTEXT_L = 'MAT DESC'.
      WA_FIELDCAT1-COL_POS = 3.
      WA_FIELDCAT1-OUTPUTLEN = 9.
      APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'MEINS'.
      WA_FIELDCAT1-TABNAME = 'IT_MARA'.
      WA_FIELDCAT1-SELTEXT_L = 'UNITS'.
      WA_FIELDCAT1-COL_POS = 4.
      WA_FIELDCAT1-OUTPUTLEN = 3.
      APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'PSTAT'.
      WA_FIELDCAT1-TABNAME = 'IT_MARA'.
      WA_FIELDCAT1-SELTEXT_L = 'STATUS'.
      WA_FIELDCAT1-COL_POS = 5.
      WA_FIELDCAT1-OUTPUTLEN = 15.
      APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
    ENDFORM.                    " field_cat
    *&      Form  events
          text
    -->  p1        text
    <--  p2        text
    FORM EVENTS .
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
      XS_EVENT-FORM = 'XEND_OF_PAGE'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'XTOP_OF_PAGE'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      XS_EVENT-FORM = 'XTOP_OF_LIST'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
      XS_EVENT-FORM = 'XEND_OF_LIST'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
      XS_EVENT-FORM = 'YEND_OF_PAGE'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'YTOP_OF_PAGE'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      XS_EVENT-FORM = 'YTOP_OF_LIST'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
      XS_EVENT-FORM = 'YEND_OF_LIST'.
      APPEND XS_EVENT TO GT_YEVENTS.
    ENDFORM.                    " events
    *&      Form  XTOP_OF_PAGE
          text
    FORM XTOP_OF_PAGE.
    BREAK-POINT.
      WRITE: / 'X_TOP_OF_PAGE'.
    ENDFORM.                    "XTOP_OF_PAGE
          FORM XTOP_OF_LIST                                             *
    FORM XTOP_OF_LIST.
    BREAK-POINT.
      WRITE: / 'X_TOP_OF_LIST'.
    ENDFORM.                    "XTOP_OF_LIST
          FORM XEND_OF_PAGE                                             *
    FORM XEND_OF_PAGE.
    BREAK-POINT.
      WRITE: / 'X_END_OF_PAGE'.
    ENDFORM.                    "XEND_OF_PAGE
          FORM XEND_OF_LIST                                             *
    FORM XEND_OF_LIST.
    BREAK-POINT.
      WRITE: / 'X_END_OF_LIST'.
    ENDFORM.                    "XEND_OF_LIST
    FORM YTOP_OF_PAGE.
    BREAK-POINT.
      WRITE: / 'Y_TOP_OF_PAGE'.
    ENDFORM.                    "YTOP_OF_PAGE
          FORM YTOP_OF_LIST                                             *
    FORM YTOP_OF_LIST.
    BREAK-POINT.
      WRITE: / 'Y_TOP_OF_LIST'.
    ENDFORM.                    "YTOP_OF_LIST
          FORM YEND_OF_PAGE                                             *
    FORM YEND_OF_PAGE.
    BREAK-POINT.
      WRITE: / 'Y_END_OF_PAGE'.
    ENDFORM.                    "YEND_OF_PAGE
          FORM YEND_OF_LIST                                             *
    FORM YEND_OF_LIST.
    BREAK-POINT.
      WRITE: / 'Y_END_OF_LIST'.
    ENDFORM.                    "YEND_OF_LIST
    *&      Form  POP_VBAP
          text
    -->  p1        text
    <--  p2        text
    FORM POP_VBAP .
      SELECT VBELN
               POSNR
               ERNAM
               ERDAT
               MATNR
               FROM VBAP
               INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
               WHERE VBELN IN S_VBELN.
    ENDFORM.                    " POP_VBAP
    *&      Form  POP_MARA
          text
    -->  p1        text
    <--  p2        text
    FORM POP_MARA .
      LOOP AT IT_VBAP.
        SELECT SINGLE MATNR
                      ERNAM
                      MATKL
                      MEINS
                      PSTAT
                      FROM MARA
                      INTO CORRESPONDING FIELDS OF IT_MARA
                      WHERE MATNR = IT_VBAP-MATNR.
        APPEND IT_MARA.
      ENDLOOP.
    ENDFORM.                    " POP_MARA
    *&      Form  BLOCK_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM BLOCK_LIST .
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM       = REPID
          I_CALLBACK_PF_STATUS_SET = ' '
          I_CALLBACK_USER_COMMAND  = 'user_command'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
          EXPORTING
            IS_LAYOUT                        = WA_LAYOUT
            IT_FIELDCAT                      = IT_FIELDCAT
            I_TABNAME                        = 'IT_VBAP'
            IT_EVENTS                        = GT_XEVENTS
      IT_SORT                          =
      I_TEXT                           = ' '
          TABLES
            T_OUTTAB                         = IT_VBAP
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 2
      OTHERS                           = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT                        = WA_LAYOUT
          IT_FIELDCAT                      = IT_FIELDCAT1
          I_TABNAME                        = 'IT_MARA'
          IT_EVENTS                        = GT_YEVENTS
        IT_SORT                          =
        I_TEXT                           = ' '
        TABLES
          T_OUTTAB                         = IT_MARA
      EXCEPTIONS
        PROGRAM_ERROR                    = 1
        MAXIMUM_OF_APPENDS_REACHED       = 2
        OTHERS                           = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK             = ' '
         IS_PRINT                      = GT_PRINT
      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        =
    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.                    " BLOCK_LIST
    refer the above program....use top_of_list event.
    Regards
    vasu

  • How can I create a horizontal line under a line of text?

    Hi,
    I have FM 12.0.3.424.
    Does anyone know how to create a horizontal line under heading text that is the width of the page?  Similar to creating a border but without the top and sides.
    Is it even possible?
    thank you in advance!

    Use the "Frame Below" attribute in the Advanced tab of the Paragraph Designer for your heading tag to use a named Reference Frame from your Reference page. If you're using the default templates for your documents, you could try the Single Line selection (or make your own).

Maybe you are looking for

  • My photoshop is not showing up in my account.

    I install photoshop cs6 in my computer it's working ok. I went to adobe to see if it was in my account and it not. How do I find it ?

  • Use of infosource in BI 7.0

    Hi, Can anybody explain me the use of infosource in BI 7.0 as we can directly load data from datasource to datatarget.

  • Validation error when submitting a form

    Hi, My first post so please don't come down on me like a ton of bricks if this is the wrong forum. I created a form in Adobe LiveCycle Designer 7,0,050519,0. Some users could not send the results back via the email button, but others did. That's okay

  • Activity type issue

    Hi Experts We have maintained new P exchange rates ( USD >> AUD)yesetday with validity form October 2009. During the costing run today we've  noticed that the activity types are not consideriing the latest rate for calculation (completed KP26 with pe

  • Scheduling Open Hub

    We want to automatically push some flat files out, perhaps using Open Hub.  However, it seems that Open Hub in flat file mode cannot be scheduled as a background process.  Only the mode that generates a database table seems to be schedule-able. Is th