How to convert XML into idocs and post in ECC using PI

Hello All,
I want to configure the scenario like this MDM->PI->ECC. Using FTP I am getting able to fetch the xml file from MDM Server Ready folder. Now, I need to convert this XML file into Idocs and post it in ECC. Can anyone provide me step by step configuration in PI to achieve this. I have configured communication channel with adapter type Idoc in Itegration Builder. But, I am not sure where it will do the conversion of XML into Idoc and how do post it to ECC. I am working first time on PI 7.1. I have worked on XI 3.0 in 2006-2007. Any help to configure this step by step shall be appreciated.
Thanks & Regards,
Hemal

In you have the XML from MDM you have to use the mapping provided by the funtionals in the Funtional specification documents. once you did it you must configure the Receiver IDoc Adapter. and later dont fonget to configure properly the ReceiverAgreement.
as you receive the docuement from MDM via FTP, thats not a SAP System that means that you have to define PI as the sender of the IDoc,otherwise you will have the Error "Unable to convert the sender service to an ALE logical system"
to do that in the receiver Agreement>Header Mapping>Sender System-->Select PI server.
Take in mind to send IDocs to any SAP System, the system that send it must be a SAP system too. thats why you configure it
http://help.sap.com/saphelp_nw04/helpdata/en/5d/112d20f6ce6c46ba66afb98d278fbd/frameset.htm
Another thing is you have configure the ALE distribution Model.
se this:
http://wiki.sdn.sap.com/wiki/display/XI/FileToIDOC
/people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
/people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
Let us know
Rodrigo P-.

Similar Messages

  • How to encode XML to Idoc and decode Idoc to XML in business connector?

    Hi all,
    first of all: thanks for all, who are reading and perhaps responding this question!
    Here some facts and my question(s):
    The facts:
    - I have the business connector version 4.6!
    - I'm not working with any SAP Netviewer!
    - I have XML files on an FTP-server and Idoc-files on an FTP-server --> so no connection between SAP and business connector, meaning: the files are just on the ftp-server!
    What am i doing and what is working properly:
    - Business connector logs in into the FTP-server (with FTP-service: pub.client.ftp:login)
    - gets the file (with FTP-service: pub.client.ftp:get) (the idoc-file, when i want to convert it into XML or the XML-file, when i want to convert it into idoc-format)
    - puts the file into another place in the server (with service wm.PartnerMgr.gateway.transport.FTPTransport:OutboundProcess)
    !!!So far only getting and putting of the file works!!!
    What is missing between getting the file in one format - for example idoc-format - and putting the file into the server in the other format - for example XML-format is:
    CONVERSION FROM XML INTO IDOC AND VICE VERSA
    My question:
    - which services i have to use between getting and putting the files?
    Thanks to all,
    Tamer

    Hi,
    I have the same problem. I do fix it?
    Thanks
    Wilson Xavier
    Brazil

  • How to convert XML into word doc or pdf

    hi all ,
    i ve to create a xml with specified alignment,but while taking print out alignments changing according to IE's alignment.
    So, Plz some one tel me whether any solution is there in xml itself or it have to be convert into word doc or PDF.If so, tell me an idea for how to convert xml file into Word doc or PDF.

    thanx ,i saw about FOP in xml.apache.org site and i learned something abt tat . But i dont know how to download FOP package from apache..
    Actually they gave links to download
    like http://ftp.wayne.edu/apache/xml/fop
    inside tat link they mentioned as parent,Directory,binaries,sources and tar files.From this i dont know how to download?
    Plz can someone tell a solution..

  • How to convert XML into XSD Using Altova XML Spy

    Hi,
    How to convert XML file into XSD Using Altova XML Spy.
    I want to use that XSD as an External Def in my IR
    Regards
    Suman

    hi
    Following is the path where you could get the PDF's and zip file.
    https://www.sdn.sap.com/irj/sdn/howtoguides?rid=/webcontent/uuid/5024a59a-4276-2910-7580-f52eb789194b [original link is broken]
    please check out the following Heading, and at the bottom corner you will find the download option where you will get the zip file:
    How to Generate XSD Schemas from Existing MDM 5.5 Repositories
    You can download xomlite45.jar from sdn
    copy the jar file to your java installation location like c:>java in
    Java –jar xomLite45.jar MyFile.xml
    then you get correspondig MyFile.xsd
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf0e8a97-0d01-0010-f0a2-af3b18b7f4eb

  • How to Convert frames into minutes and seconds

    Hi,
    does anyone know how to convert frames into time (minutes and
    seconds). I need the users to view the swf with current time being
    played and over time. I have 2152 frames in total and I want that
    to be converted to time. Can anyone help me on this. I would really
    appreciate it. It is very urgent!!!!
    Thanks

    Time Indicator,
    > does anyone know how to convert frames into time
    (minutes
    > and seconds).
    That depends entirely on the framerate of the movie. At the
    default
    12fps, 12 frames would be one second; 24 frames would be two.
    At 24fps, 24
    frames would be one second.
    > I need the users to view the swf with current time being
    played
    > and over time. I have 2152 frames in total and I want
    that to be
    > converted to time. Can anyone help me on this. I would
    really
    > appreciate it. It is very urgent!!!!
    Judging by your four exclamation points, I'd say it's
    definitely urgent!
    Well, again, if you're at 12fps, 2152 frames would take 179
    seconds, or 2
    minutes and 59 seconds. I arrived at that number by dividing
    2152 by 12.
    Keep in mind, though, framerate is actually more of a
    guideline than an
    exact figure. Framerate determines the rate at which Flash
    will *try* to
    display content. On an especially slow computer, the Flash
    Player may not
    be able to keep up, and the same number of frames might
    actually take more
    time.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Hiii, i have m rows & n columns in my table..how to convert it into m columns & n rowa by using sql..pls help me...thanks.

    hiii,
    I have a table which has 14 rows & 8 cols.
    I want covert it into 14 cols & 8 rows,
    by using sql how to do it..pls help me.

    Oracle Database Search Results: pivot

  • How to Convert XML to IDoc

    Hi,
        Is there any way r by any means i can communicate and receive data from a .Net application which posts data in XML Format to SAP Server and without changing the functionality of the .Net application XMl Format, still maintaining the IDoc Format to the SAP Server. And Viceversa.
    Suggestion for this will be much appreciated
    Thanks & Regards

    hi
      there are some function modules to accomplish this.
    IDOCS_OUTPUT_IN_XML_FORMAT
    IDOCS_OUTPUT_VIA_XML_HTTP
    for inbound processing,
    IDOC_INBOUND_XML_SOAP_HTTP
    IDOC_INBOUND_XML_VIA_HTTP
    IDOC_XML_FROM_FILE
    IDOC Adaptor,
    IDX_IDOC_TO_XML
    Extended table maintenance, to display IDOC in XML format with XSL,
    IDOC_XML_DISPLAY
    IDOC_XML_TRANSFORM
    hope this helps,
    regards,
    ak
    PS: Do reward useful answers.

  • How to convert smartform into pdf and send through mail

    Hi Guru,
    I want to send smartform to mail after converting into pdf format.
    if anyof u gives solution its greate.
    Thanks & Regards,
    Lakshmi..

    Hi,
    i can help you till
    downloading the smartform as pdf format
    check this
    DATA: GIT_BSIK LIKE BSIK OCCURS 0 WITH HEADER LINE.
    Variable declarations
    DATA:
    W_FORM_NAME TYPE TDSFNAME VALUE 'ZFII_EDD001',
    W_FMODULE TYPE RS38L_FNAM,
    W_CPARAM TYPE SSFCTRLOP,
    W_OUTOPTIONS TYPE SSFCOMPOP,
    W_BIN_FILESIZE TYPE I, " Binary File Size
    W_FILE_NAME TYPE STRING,
    W_FILE_PATH TYPE STRING,
    W_FULL_PATH TYPE STRING.
    Internal tables declaration
    Internal table to hold the OTF data
    DATA:
    T_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
    Internal table to hold OTF data recd from the SMARTFORM
    T_OTF_FROM_FM TYPE SSFCRESCL,
    Internal table to hold the data from the FM CONVERT_OTF
    T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE.
    This function module call is used to retrieve the name of the Function
    module generated when the SMARTFORM is activated
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
        FORMNAME = W_FORM_NAME
        VARIANT = ' '
        DIRECT_CALL = ' '
        IMPORTING
        FM_NAME = W_FMODULE
        EXCEPTIONS
        NO_FORM = 1
        NO_FUNCTION_MODULE = 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.
    Calling the SMARTFORM using the function module retrieved above
    GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
    format of the output
    W_CPARAM-NO_DIALOG = 'X'.
    W_CPARAM-PREVIEW = SPACE. " Suppressing the dialog box
    " for print preview
    W_CPARAM-GETOTF = 'X'.
    Printer name to be used is provided in the export parameter
    OUTPUT_OPTIONS
    W_OUTOPTIONS-TDDEST = 'ZPC_'.
          CALL FUNCTION W_FMODULE
          EXPORTING
          ARCHIVE_INDEX =
          ARCHIVE_INDEX_TAB =
          ARCHIVE_PARAMETERS =
          CONTROL_PARAMETERS = W_CPARAM
          MAIL_APPL_OBJ =
          MAIL_RECIPIENT =
          MAIL_SENDER =
          OUTPUT_OPTIONS = W_OUTOPTIONS
          USER_SETTINGS = 'X'
          IMPORTING
          DOCUMENT_OUTPUT_INFO =
          JOB_OUTPUT_INFO = T_OTF_FROM_FM
          JOB_OUTPUT_OPTIONS =
               TABLES
                ITAB                       = GIT_BSIK
          EXCEPTIONS
          FORMATTING_ERROR = 1
          INTERNAL_ERROR = 2
          SEND_ERROR = 3
          USER_CANCELED = 4
          OTHERS = 5.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    T_OTF[] = T_OTF_FROM_FM-OTFDATA[].
    Function Module CONVERT_OTF is used to convert the OTF format to PDF
          CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
          FORMAT = 'PDF'
          MAX_LINEWIDTH = 132
          ARCHIVE_INDEX = ' '
          COPYNUMBER = 0
          ASCII_BIDI_VIS2LOG = ' '
          PDF_DELETE_OTFTAB = ' '
          IMPORTING
          BIN_FILESIZE = W_BIN_FILESIZE
          BIN_FILE =
          TABLES
          OTF = T_OTF
          LINES = T_PDF_TAB
          EXCEPTIONS
          ERR_MAX_LINEWIDTH = 1
          ERR_FORMAT = 2
          ERR_CONV_NOT_POSSIBLE = 3
          ERR_BAD_OTF = 4
          OTHERS = 5
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *To display File SAVE dialog window
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = w_FILE_NAME
    path = w_FILE_PATH
    fullpath = w_FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
    presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE = W_bin_filesize
    filename = w_FULL_PATH
    FILETYPE = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = T_pdf_tab
    FIELDNAMES =
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanks & regards,
    Venkatesh

  • How To Convert XML into String?

    Hi,
    I have a requirement in which I need to convert the data from XML file to string.
    E.g.
       <Drawing>
          <DrawingSpecification>
             <Header>
                <SoldTo>SDN</SoldTo>
                <SoldToName>SAP</SoldToName>
                <Date/>
                <Manager>CEO</Manager>
                < Plant>INDIA</Name>
                <Items>
                   <Item>
                       < MaterialNumber>MatNum12</ MaterialNumber>
                       <ProductNumber>ProName12</ ProductNumber>
                   </Item>
               </Items>
               < ClientId>ClientID123</ ClientId>
               <FileName>FileName123</FileName>
               <Type/>
               < TemplateName/>
          </DrawingSpecification>
          <Image contentType=""/>
       < /Drawing>
    Output should be like:
       < File>
          < Content> SDN SAP CEO INDIA MatNum12 ProName12 ClientID123 FileName123</Content>
       < /File>
    Please provide solution for the same.
    Thanks,
    Abhishek.

    what about something like this
    package test;
    import java.io.File;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class Test {
         public static void main(String args[]) throws Exception {
              DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
              DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
              Document doc = docBuilder.parse(new File("test.xml"));
              StringBuffer buffer = new StringBuffer();
              appendChildren(buffer, doc.getChildNodes());
              System.out.println(buffer.toString());
         private static void appendChildren(StringBuffer buffer, NodeList list) {
              for (int i = 0; i < list.getLength(); i++) {
                   Node node = list.item(i);
                   if (node.getNodeValue() != null) {
                        if (node.getNodeValue().trim().length() > 0) {
                             buffer.append(node.getNodeValue()).append("|");
                   appendChildren(buffer, node.getChildNodes());
    ...btw: IMHO the use of this forum is to get an answer to an particular question - not to ask for complete solutions - create the solution yourself an ask if you are stuck somewhere (with a bit of research (google) it is not hard to find a solution for your problem)
    regards franz
    ...close thread if question is answered

  • Convert xml into SAP using dataset

    Hi All,
    How to convert XML into itab using dataset, in this conversion have any function module available? please give me a sample program (having any). and material also.
    Thanks,
    Suresh maniarasu

    Hi,
    First you need to get the XML file Data into SAP using the  Function Module and can populate the data into an inernal table.
    TEXT_CONVERT_XML_TO_SAP
    DMC_CONVERT_XML_TO_TABLE
    or you can use the following classes
    CL_RSRD_CONVERTER_XML
    CL_WDR_XML_CONVERT_UTIL
    CL_EXM_IM_ISHCM_CONV_XML_SAP
    Thank U,
    Jay....

  • How to convert arraylist into array

    how to convert arraylist into array?

    If you are using generics, I would use this version of toArray:
    List < X > list = ...
    X[] array = list.toArray(new X[list.size()]);If you are not using generics, that same thing looks like:
    List  list = ...
    X[] array = (X[]) list.toArray(new X[list.size()]);

  • How to convert xml data into html format in bpel

    Hi ,
    Can any one tel me how to conevrt xml into html in oracle bpel.
    Does bpel support this functionality or not.
    Regards,
    Ana
    Edited by: user10181991 on Apr 5, 2009 11:16 PM

    Ana,
    We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
    Let me know if this helps.

  • How to receive XML from Flex HTTP POST

    Hi,
    We curreontly have a setup where we have a FLEX frontend send an XML through a HTTP POST and awaiting a response also in XML. On the backend this is handled relatively simply by a PHP script that basically does the following:
    read data (in XML)from FlEX HTTP POST into a new temp XML file.
    execute a c++ program with the XML file as one of the parameter.
    return the result to FLEX
    We have decided to move to BlazeDS for various reasons.
    Looking at the examples bundled with BlazeDS they have a jsp example that returns an XML result to FLEX so that part is fine. I am trying to find an example of JSP (or Servlet) that is able to read the XML data from FLEX and write it into a temp XML file. I would then try to use runtime.exec to invoke a local C++ program to process the XML file the result of which will be sent back to FLEX.
    Any help will be very much appreciated!

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I&#8217;d avoid calling an executable just to process XML &#8211;your<br />application server would provide enough support for reading and writing XML, no?<br />Also, if you&#8217;re only planning on working with XML then even BlazeDS might<br />be overkill because its focus is on sending strongly typed ActionScript data efficiently<br />to and from a client (it&#8217;s true that it does have a proxy service, but<br />that is not involved with processing the actual XML data).<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>How complex is your XML? Do you need to resolve ids and<br />references or can you parse it top down in a single pass? There are several<br />well known libraries in Java for dealing with XML &#8211; the choice depends on<br />how you need to interact with the XML. Most of them take an InputStream as a<br />source for reading XML and you can get the InputStream from the servlet<br />request. Googling should turn up numerous examples.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Pete<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><br /><br /><div><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> khwong<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Sunday, September 28, 2008 12:09 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How to receive XML from Flex HTTP POST<o:p></o:p></span></p><br /><br /></div><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />khwong in <br><br /><br><br /><b>General Discussion</b> --<br><br />  How to receive XML from Flex HTTP POST<br><br /><br><br />Hi, <br><br /><br><br />We curreontly have a setup where we have a FLEX frontend send an XML through a<br />HTTP POST and awaiting a response also in XML. On the backend this is handled<br />relatively simply by a PHP script that basically does the following: <br><br /><br><br />read data (in XML)from FlEX HTTP POST into a new temp XML file. <br><br />execute a c++ program with the XML file as one of the parameter. <br><br />return the result to FLEX <br><br /><br><br />We have decided to move to BlazeDS for various reasons. <br><br /><br><br />Looking at the examples bundled with BlazeDS they have a jsp example that<br />returns an XML result to FLEX so that part is fine. I am trying to find an<br />example of JSP (or Servlet) that is able to read the XML data from FLEX and<br />write it into a temp XML file. I would then try to use runtime.exec to invoke a<br />local C++ program to process the XML file the result of which will be sent back<br />to FLEX. <br><br /><br><br />Any help will be very much appreciated! <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b69b23">How to receive XML from<br />Flex HTTP POST</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b69b23!folder=.3c061a83">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div><br /><br /></div>

  • How to convert report into alvgrid please hepl

    how to convert report into alvgrid please hepl

    BALVSD01 check this program u will know r see below code
    sample prog
    REPORT  ZMAT11                                  .
    TYPE-POOLS : slis.
    TABLES : mkpf,
             mseg,
             t001w,
             t001l.
    TYPES : BEGIN OF ty_t001w,
              werks TYPE t001w-werks,
              name1 TYPE t001w-name1,
            END OF ty_t001w,
            BEGIN OF ty_makt,
              matnr TYPE makt-matnr,
              maktx TYPE makt-maktx,
            END OF ty_makt,
            BEGIN OF ty_t001l,
              lgort TYPE t001l-lgort,
              lgobe TYPE t001l-lgobe,
            END OF ty_t001l.
    DATA :  BEGIN OF it_mat OCCURS 0,
            mblnr LIKE mseg-mblnr,
            zeile LIKE mseg-zeile,
            mjahr LIKE mseg-mjahr,
            bldat LIKE mkpf-bldat,
            budat LIKE mkpf-budat,
            bwart LIKE mseg-bwart,
            matnr LIKE mseg-matnr,
            maktx LIKE makt-maktx,
            erfmg LIKE mseg-erfmg,
            erfme LIKE mseg-erfme,
            werks LIKE mseg-werks,
            name1 LIKE t001w-name1,
            lgort LIKE mseg-lgort,
            lgobe LIKE t001l-lgobe,
            umwrk LIKE mseg-umwrk,
            name2 LIKE t001w-name1,
            umlgo LIKE mseg-umlgo,
            lgobe1 LIKE t001l-lgobe,
            END OF it_mat.
    DATA : it_t001w TYPE TABLE OF ty_t001w
                     WITH HEADER LINE,
           it_makt TYPE TABLE OF ty_makt
                   WITH HEADER LINE,
           it_t001l TYPE TABLE OF ty_t001l
                    WITH HEADER LINE.
    DATA : ls_layout TYPE slis_layout_alv,
           it_fcat TYPE slis_t_fieldcat_alv ,
           wa_fcat TYPE slis_fieldcat_alv,
           lh TYPE slis_t_listheader,
           ls TYPE slis_listheader,
           it_events TYPE slis_t_event  ,
           ls_event TYPE slis_alv_event ,
           w_var TYPE i.
    DATA : l_date(10).
    DATA : l_date1(20),
           ztabix LIKE sy-tabix.
    DATA : l_repid LIKE trdir-name.
    l_repid = 'ZMAT11'.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_werks FOR mseg-werks,
                     s_lgort FOR mseg-lgort,
                     s_umwrk FOR mseg-umwrk,
                     s_umlgo FOR mseg-umlgo,
                     s_bwart FOR mseg-bwart,
                     s_budat FOR mkpf-budat,
                     s_mjahr FOR mkpf-mjahr.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN.
      SELECT SINGLE * FROM t001w INTO t001w
                              WHERE werks IN s_werks.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Supplying Plant'.
      ENDIF.
      SELECT SINGLE * FROM t001w INTO t001w
                              WHERE werks IN s_umwrk.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Receiving Plant'.
      ENDIF.
      SELECT SINGLE * FROM t001l INTO t001l
                              WHERE lgort IN s_lgort.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Supplying St.Loc'.
      ENDIF.
      SELECT SINGLE * FROM t001l INTO t001l
                              WHERE lgort IN s_umlgo.
      IF sy-subrc <> 0.
        MESSAGE e000(8i) WITH 'Enter a Valid Receiving St.Loc'.
      ENDIF.
    START-OF-SELECTION.
      ls-typ = 'H'.
      ls-info = 'Material Document List'.
      APPEND ls TO lh.
      ls-typ = 'S'.
      WRITE: sy-datum TO l_date USING EDIT MASK '__/__/____'.
      CONCATENATE 'DATE :' l_date INTO l_date1 SEPARATED BY space.
      ls-info = l_date1.
      APPEND ls TO lh.
      PERFORM field_cat.
      PERFORM f001_get_data.
    END-OF-SELECTION.
      IF it_mat[] IS INITIAL.
        MESSAGE i000(8i) WITH 'No data Found'(m01).
        EXIT.
      ENDIF.
      PERFORM process_data.
      PERFORM display_data.
    *&      Form  f001_get_data
          text
    -->  p1        text
    <--  p2        text
    FORM f001_get_data .
      SELECT amblnr azeile amjahr abwart a~matnr
               aerfmg aerfme awerks algort aumwrk aumlgo
               b~budat
               b~bldat INTO CORRESPONDING FIELDS OF TABLE it_mat
                       FROM mseg AS a
                 INNER JOIN mkpf AS b
                    ON amblnr = bmblnr
                   AND amjahr = bmjahr
                 CLIENT SPECIFIED
              WHERE a~mandt EQ sy-mandt
                AND a~werks IN s_werks
                AND a~lgort IN s_lgort
                AND a~umwrk IN s_umwrk
                AND a~umlgo IN s_umlgo
                AND a~bwart IN s_bwart
                AND b~budat IN s_budat
                AND b~mjahr IN s_mjahr.
      IF sy-subrc = 0.
        SELECT matnr maktx INTO TABLE it_makt FROM makt
        CLIENT SPECIFIED
        FOR ALL ENTRIES IN it_mat
        WHERE mandt EQ sy-mandt
          AND matnr = it_mat-matnr.
      ENDIF.
      SELECT werks name1 INTO TABLE it_t001w FROM t001w
      CLIENT SPECIFIED
      WHERE mandt EQ sy-mandt.
      IF sy-subrc <> 0.
        MESSAGE i000(8i) WITH 'No Plant Found'(m02).
      ENDIF.
      SELECT lgort lgobe INTO TABLE it_t001l FROM t001l
      CLIENT SPECIFIED
      WHERE mandt EQ sy-mandt.
      IF sy-subrc <> 0.
        MESSAGE i000(8i) WITH 'No Storage Location Found'(m03).
      ENDIF.
    ENDFORM.                    " f001_get_data
    *&      Form  field_cat
          text
    -->  p1        text
    <--  p2        text
    FORM field_cat .
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MBLNR'.
      wa_fcat-key = 'X'.
      wa_fcat-hotspot = 'X'.
      wa_fcat-ref_fieldname = 'MBLNR'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Material Doc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ZEILE'.
      wa_fcat-ref_fieldname = 'ZEILE'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Item No'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MJAHR'.
      wa_fcat-ref_fieldname = 'MJAHR'.
      wa_fcat-ref_tabname = 'MSEG'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BWART'.
      wa_fcat-ref_fieldname = 'BWART'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Mvmt Type'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BLDAT'.
      wa_fcat-ref_fieldname = 'BLDAT'.
      wa_fcat-ref_tabname = 'MKPF'.
      wa_fcat-seltext_m = 'Document Date'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'BUDAT'.
      wa_fcat-ref_fieldname = 'BUDAT'.
      wa_fcat-ref_tabname = 'MKPF'.
      wa_fcat-seltext_m = 'Posting Date'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-ref_fieldname = 'MATNR'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Material No'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'MAKTX'.
      wa_fcat-ref_fieldname = 'MAKTX'.
      wa_fcat-ref_tabname = 'MAKT'.
      wa_fcat-seltext_m = 'Material Description'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ERFMG'.
      wa_fcat-ref_fieldname = 'ERFMG'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Quantity'.
      wa_fcat-do_sum = 'X'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'ERFME'.
      wa_fcat-ref_fieldname = 'ERFME'.
      wa_fcat-ref_tabname = 'MSEG'.
      wa_fcat-seltext_m = 'Uom'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'WERKS'.
      wa_fcat-seltext_m = 'Supplying Plant'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-seltext_m = 'S.Plnt Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGORT'.
      wa_fcat-seltext_m = 'Supplying St.Loc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGOBE'.
      wa_fcat-seltext_m = 'Su.St.Loc Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'UMWRK'.
      wa_fcat-seltext_m = 'Receiving Plant'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'NAME2'.
      wa_fcat-seltext_m = 'R.Plnt Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'UMLGO'.
      wa_fcat-seltext_m = 'Receiving St.Loc'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
      wa_fcat-col_pos = w_var.
      wa_fcat-tabname = 'IT_MAT'.
      wa_fcat-fieldname = 'LGOBE1'.
      wa_fcat-seltext_m = 'Re.St.Loc Desc.'.
      APPEND wa_fcat TO it_fcat.
      CLEAR wa_fcat.
      ADD 1 TO w_var.
    ENDFORM.                    " field_cat
    *&      Form  process_data
          text
    -->  p1        text
    <--  p2        text
    FORM process_data .
      LOOP AT it_mat.
        ztabix = sy-tabix.
        READ TABLE it_makt WITH KEY matnr = it_mat-matnr.
        IF sy-subrc = 0.
          it_mat-maktx = it_makt-maktx.
        ENDIF.
        IF it_mat-bwart+2(1) = '2'.
          it_mat-erfmg = - ( it_mat-erfmg ).
        ENDIF.
        READ TABLE it_t001w WITH KEY werks = it_mat-werks.
        IF sy-subrc = 0.
          it_mat-name1 = it_t001w-name1.
        ENDIF.
        READ TABLE it_t001w WITH KEY werks = it_mat-umwrk.
        IF sy-subrc = 0.
          it_mat-name2 = it_t001w-name1.
        ENDIF.
        READ TABLE it_t001l WITH KEY lgort = it_mat-lgort.
        IF sy-subrc = 0.
          it_mat-lgobe = it_t001l-lgobe.
        ENDIF.
        READ TABLE it_t001l WITH KEY lgort = it_mat-umlgo.
        IF sy-subrc = 0.
          it_mat-lgobe1 = it_t001l-lgobe.
        ENDIF.
        MODIFY it_mat INDEX ztabix .
      ENDLOOP.
    ENDFORM.                    " process_data
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
              I_INTERFACE_CHECK                 = ' '
              I_BYPASSING_BUFFER                = ' '
              I_BUFFER_ACTIVE                   = ' '
               i_callback_program                = l_repid
              I_CALLBACK_PF_STATUS_SET          = ' '
               i_callback_user_command           = 'LINE'
               i_callback_top_of_page            = 'TOP'
              I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
              I_CALLBACK_HTML_END_OF_LIST       = ' '
              I_STRUCTURE_NAME                  =
              I_BACKGROUND_ID                   = ' '
              I_GRID_TITLE                      =
              I_GRID_SETTINGS                   =
              IS_LAYOUT                         =
               it_fieldcat                       = it_fcat
              IT_EXCLUDING                      =
              IT_SPECIAL_GROUPS                 =
              IT_SORT                           =
              IT_FILTER                         =
              IS_SEL_HIDE                       =
              I_DEFAULT                         = 'X'
              I_SAVE                            = ' '
              IS_VARIANT                        =
              it_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_mat
            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_data
    *&      Form  TOP
          text
    FORM top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = lh
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP

  • How to convert .class into .jar file

    Hi,
    How to convert .class into .jar file

    jsf_VWP5.5.1 wrote:
    Hi,
    How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
    If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
    If you want to compile all .class files in a directory into a jar, use *.class instead.
    Now, I'm going to assume you want to create an executable jar... here's how to do that:
    1) Create a blank text file; for this example, lets call it main.txt.
    2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
    3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
    4) Make sure you save this file in the same directory as your .class file(s).
    5) Type: jar -cmf Whatever.jar main.txt Whatever.class
    ...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
    Hope that helps.

Maybe you are looking for

  • Safari quit unexpectedly, over and over!

    I just took my computer in to the Apple Store because it was totally frozen. They replaced the hard drive and it's now able to function, but Safari won't work at all. Every time I try to open it, I get the "Safari quit unexpectedly" error message. Is

  • Shippment cost (VI01)- Settlement date

    Hello, I had recently implemented shipment cost process to the business. As usual I did all the config settings in the development server and tested the output and transport moved to testing server. There in the testing environment I found some inter

  • Checkboxes in PDF from Excel

    Windows XP; Acrobat XI Pro (11.0.06); Excel 2007. I created an Excel sheet (xlsx) that contains a checkbox at the beginning of each line.  I can check these boxes in Excel. When I create a PDF from it, the checkboxes are there, but I cannot check the

  • Problem with ALV amount field display

    hi friend!! i have a editable ALv out put and in that i am displaying Amount and quantity field. In O/p if i enter 100 its taking as 100,00 .Please tell me how to correct the same. Plz help me

  • Syncing iTunes with iPhone5 NOT WORKING.

    I cannot get my iphone5 to sync with itunes music and i've tried ALL the suggested ideas. plz help.