How to align the output?

Hi all,
The following code snippet:
produced output like this:
Material Number     Created By     Changed By     Material Type     Material Status     Material description     
000000000000000001     FRE8OT     MES2KOR     FERT          Test     
000000000000000002     FRE8OT     RI78OT     FERT          Test     
000000000000000011     JA72KOR     JMR1KOR     PROD          new product group     
000000000000000023     LAP8OT     RI78OT     FERT          test mmam     
000000000000000031     RI78OT     RI78OT     FERT          Test-Test     
000000000000000032     RI78OT     RI78OT     FERT          Test-Test-Test     
STNL     HT88OT     NNR3KOR     HALB          STNL     
TESTMAT     RI78OT     RI78OT     FERT          Test-Material     
TESTMATERIAL     RI78OT     RI78OT     FERT          Testmaterial     
ZJA_TEST     JMR1KOR     SAB2KOR     FERT          Test     
ZJA_TEST1     JMR1KOR     SAB2KOR     FERT          test     
ZJA_TEST2     JMR1KOR          FERT          test     
ZJA_TEST23     JMR1KOR          FERT          test

Hi,
Use the Function module CONVERSION_EXIT_MATN1_INPUT to convert material no 100 to 000000000000000100 before displaying in output.
This FM adds zeros preceds to the material no.
Regards,
Sunil

Similar Messages

  • How to align the output in a file?

    Hello Experts,
    The following code snippet:
    CONCATENATE  'Material Number '
                   'Created By'
                   'Changed By'
                   'Material Type'
                   'Material Status'
                   'Material description'
                   cl_abap_char_utilities=>cr_lf
                   INTO g_data SEPARATED BY g_c_tab.
      TRANSFER g_data TO p_pth_as.
    LOOP AT g_t_output INTO g_r_output.
        MOVE-CORRESPONDING g_r_output TO g_r_transfer.
        CLEAR: g_data, g_r_output.
        CONCATENATE g_r_transfer-matnr
                    g_r_transfer-ernam
                    g_r_transfer-aenam
                    g_r_transfer-mtart
                    g_r_transfer-mstae
                    g_r_transfer-maktx
                    cl_abap_char_utilities=>cr_lf
           INTO g_data SEPARATED BY g_c_tab.
        TRANSFER g_data TO p_pth_as.
    produced output like this:
    Material Number    Created By     Changed By         Material Type  Material Status    Material description     
    000000000000000001     FRE8OT     MES2KOR     FERT          Test     
    000000000000000002     FRE8OT     RI78OT     FERT          Test     
    000000000000000011     JA72KOR     JMR1KOR     PROD          new product group     
    000000000000000023     LAP8OT     RI78OT     FERT          test mmam     
    000000000000000031     RI78OT     RI78OT     FERT          Test-Test     
    000000000000000032     RI78OT     RI78OT     FERT          Test-Test-Test     
    000000000000000037     RI78OT     RI78OT     FERT          Testtest     
    000000000000000038     RI78OT     RI78OT     FERT          Teeest     
    000000000000000061     PIM8OT          ERSA          test     
    000000000000000072     PIM8OT     STK2KOR     HAWA          Test     
    000000000000010001     FRE8OT     MES2KOR     FERT               
    STNL     HT88OT     NNR3KOR     HALB          STNL     
    TESTMAT     RI78OT     RI78OT     FERT          Test-Material     
    TESTMATERIAL     RI78OT     RI78OT     FERT          Testmaterial     
    ZJA_TEST     JMR1KOR     SAB2KOR     FERT          Test     
    ZJA_TEST1     JMR1KOR     SAB2KOR     FERT          test     
    ZJA_TEST2     JMR1KOR          FERT          test     
    ZJA_TEST23     JMR1KOR          FERT          test     
    But the output produced in the file should be formatted, so that every field values appear under the appropriate column heading.
    Expecting suitable solution to produce formatted output.
    Thanks and best regards,
    Suresh
    Edited by: Suresh S on Jan 19, 2009 10:54 AM

    Hi,
    Try using the psotioning .
    For e.g.
    write :/ 2 Material Number, 15 Material desc.
    Hope this helps u.
    Thanks & Regards

  • How to align the 2 rows into 1 row?

    Here is the SQL below:
    SELECT distinct QP.QIP_id,
            Max(decode( Upper(QP.Status_CD), Upper('Approved') , Effective_date, null ))  as Approved_date,
            Max( decode( Upper(QP.Status_CD), Upper('Submitted') , Effective_date, null ) ) as Submitted_date
             FROM  Llp_Sys.Project_Status QP
             WHERE Upper(Qp.Status_cd) in (Upper('Approved'),Upper('Submitted'))
                AND qp.qip_id = 79440
            GROUP by QP.QIP_ID,Qp.Status_CDThe output data is displayed as below:
    79440  NULL     01-FEB-10
    79440 04-FEB-10     NULLHow can I display only 1 row in the output instead of 2 rows.? I mean How to align the rows ?

    Hi,
    When you say
    GROUP by QP.QIP_ID,Qp.Status_CDthe output will contain one row for each distinct combination of values found for qid_id and status_cd. If you want one row for each distinct value of qui_id, including all status_cds, then say
    GROUP by QP.QIP_IDwithout mentioning qip_id, as Bigc suggested. There is nothing in the query that you posted that would cause an error if you did this. If you tried it and got an error message, then post the complete query that causes the error, and the complete error message, including the line number.
    (If all the columns in the GROUP BY clause are also in the SELECT clause, then you don't have to say SELECT DISTINCT , since the output has separate rows only for distinct values of the GROUP BY columns.)
    Whenever you have any problem, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. You'll get better answers faster.

  • How to store the output of a analog to digital converter into an 2D array

    Hi
    I am doing my M.Tech Thesis in Image reconstruction and I am using labview for simulation and I want to know how to store the output of a analog to digital converter into an 2D labview array.

    nitinkajay wrote:
    I want to know how to store the output of a analog to digital converter into an 2D labview array.
    How exactly are you performing 'Analog to Digital'???
    Grabbing image using camera OR performing data acquisition using DAQ card OR some other way????
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • How to download the output of a report along with column header

    Hi,
    Could someone please tell me on how to download the output of a report along with column header to .txt format. A download option needs to be given to the user using physical and logical file names .The report basically contains header details and item details and requirement is to download the same format into an .txt format.

    Hello,
    Try this FM:
    Data: being of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    data:begin of fld_tab occurs 0,
    fld_name(20),
    end of fld_tab.
    fld_tab = 'Material'.
    append fld_tab.
    fld_tab = 'Material Desc'.
    append fld_tab.
    CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            BIN_FILESIZE            = ' '
            CODEPAGE                = ' '
             FILENAME                = 'C:\1.txt '
             FILETYPE                = 'DAT'
            MODE                    = ' '
            WK1_N_FORMAT            = ' '
            WK1_N_SIZE              = ' '
            WK1_T_FORMAT            = ' '
            WK1_T_SIZE              = ' '
            COL_SELECT              = ' '
            COL_SELECTMASK          = ' '
            NO_AUTH_CHECK           = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              DATA_TAB                = itab
              FIELDNAMES              = fld_tab
       EXCEPTIONS
            FILE_OPEN_ERROR         = 1
            FILE_WRITE_ERROR        = 2
            INVALID_FILESIZE        = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Naimesh

  • How to use the Output clause for the updated statment

    How to use the output clause for the below update stament,
    DECLARE @MyTableVar table(
        sname int NOT NULL)
    update A set stat ='USED' 
    from (select top 1 * from #A 
    where stat='AVAILABLE' order by sno)A
    Output inserted.sname
    INTO @MyTableVar;
    SELECT sname
    FROM @MyTableVar;
    Here am getting one error incorrect syntax near Output
    i want to return the updated value from output clause

    see
    http://blogs.msdn.com/b/sqltips/archive/2005/06/13/output-clause.aspx
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to change the output as text format in Apps R12.1.3

    Hi All,
    Currently iam trying to modify the Java Concurrent Program (FDExtractAndFormatting) in Batch Payment Process. This Program is generated in text format in 11i APPS. Now we are upgrading to R12.1.3. In R12.1.3 output is coming as PDF format. Here my requirement is how to change the output as text format in R12.1.3 also.
    Please do the needful and suggest me.
    Regards,
    Jagadeesh

    1. It is seeded java concurrent program. Some attributes are missing from 11i to R12. In 11i it is a text format.So i have to investgate on how to retrive those attributes in R12. What is the concurrent program name?
    Have you tried to change the output and submit the request?
    2. Once all are attributes are coming in PDF format. Client wants to open same output in text format as it is 11i (In R12 it is generated in PDF format).If the above does not help, please log a SR.
    Thanks,
    Hussein

  • How to download the output of two reports in WebTemplate into excel sheet?

    How to download the output of webtemplate which consists of two reports in one  Web Template into same Excel sheet?

    hi sunil,
    here is the HTML code for 'export to excel'
    <!-- Display Export Excel--->
    <td class="SAPBEXNavLine"> <SAP_BW_TEXT program="SAPLRRSV" key="T72">" src="Mime/BEx/Icons/S_X_XLS.gif" border=0 ></td>
    you can also use BEx download scheduler to download the precalculated webtemplate report to excel sheet.
    Check the link below.
    https://websmp104.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000401962004E
    i think this will help u
    regards,
    sindhu.

  • How to send the output to PDF format in reports 6i?

    Hi,
    How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
    DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
    Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
    Thanks
    Kavitha

    Hello,
    Do you get this problem only for DESFORMAT=PDF ?
    Test with :
    DESFORMAT = RTF, DESNAME = C:\x.rtf
    or
    DESFORMAT = HTMLCSS, DESNAME = C:\x.html
    does it work ?
    Check if DESNAME is modified in the reports itself.
    Regards

  • How to get the output of the report in pdf format

    how to get the output of the report in pdf format?
    Thanks in advance,
    madan.

    Refer these links
    http://www.sap-img.com/bc037.htm
    http://www.members.tripod.com/abap4/Save_Report_Output_to_a_PDF_File.html
    CONVERT_ABAPSPOOLJOB_2_PDF FM convert abap spool output to PDF

  • How to get the output of my batch file or script file

    Hello,
    I am a beginner in java and I have to run a batch file(in win) or a script(in linux). I want the output of the file in my java program. How to read the output. I used the following code and it always gave me the empty string output
    Runtime r = Runtime.getRuntime();
    Process p = null;
    p = r.exec("./test.bat"); //./test.sh
    int res = p.waitFor();
    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String tempStr = "", str = null;
    while((str=br.readLine()) != null) {
    tempStr += str + "\n";
    System.out.println(tempStr);
    I know this is a simple one but it's taking a lot of time. Can any one there help me quickly.

    hi
    the below function works well for me..
    just make a try with it
    protected String runConsoleCommand(String command) throws IOException {
    Process p = Runtime.getRuntime().exec(command);
    InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
    StringBuffer buffer = new StringBuffer();
    for (; ; ) {
    int c = stdoutStream.read();
    if (c == -1)
    break;
    buffer.append( (char) c);
    String outputText = buffer.toString();
    stdoutStream.close();
    System.out.println("the output to file is:"+outputText);
    return outputText;

  • How to get the output of Standard HR forms in PE51

    Hi Experts,
    How to get the output of standard HR forms available in PE51 Transaction for coutry grouping 99.
    Please advice.
    Regards,
    IFF

    Hi
    Use the t code for country grouping 99....PC00_M99_CEDT - Remuneration Statement. to get the variant in tcode PC00_M99_CALC_SIMU - Simulation.
    Like this test for all the standard forms, what all are the available in PE51 for country grouping 99

  • How to save the output of sap script to pdf document in sap

    hi abapers
    how to save the output of sap script in sap so that can retrieve the saved document later.
    i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
    how to use dms

    Hi deepika,
    This thread will solve ur problem OTF  -> PDF
    Regards,
    Pravin

  • How to change the output directory of .xml files

    Hi,
    There are lots of .xml files generated under
    $ORACLE_AS_HOME/j2ee/home/applications/xmlpserver/xmlpserver/xml.
    (ex:/usb/bipub3/oracle/oc4j_bi/j2ee/home/applications/xmlpserver/xmlpserver/xml).
    I found these files are generated in the following operation;
    1.Log in BI Publisher.
    2.Select the Schedules tab.
    I think they are kind of temp files so we will be able to delete them.
    But I'd like to know how to change the output directory.
    Can we change the above directory to other path?
    Regards.

    Why? As that may invalidate support since you configure/alter the deployment.
    The location is specified in oc4j_bi\j2ee\home\applications\xmlpserver\xmlpserver.war, so you could go into the war file and alter it.

  • How to change the output executable file name(a.prj:(output)--- b.exe)

    LabWindows / CVI: how to change the output executable file name
                For example, I have an A project a.prj, I do not want to compile the output file is a.exe, but b.exe.
    I will try to save as a.prj b.prj, a.cws save as b.cws
    eg:a.prj  ---->(output)--->b.exe
    Solved!
    Go to Solution.

    You can go to Build >> Target Settings menu item, select Release (or Release 64) in the Configuration filed and set the name of the executable to create in Application FIle field, withouyt need to change the prj or cws filename.
    See the complete description of available options here.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

Maybe you are looking for

  • Setting up single sign-on in PI 7.1

    Has anyone found a 'how-to' guide for setting up single sign-on in PI 7.1? I used the (excellent) guide for XI 7.0 but there appear to be some differences (for example, the sap.com/com.sap.xi.rwb*rwb_mdt component is missing in the runtime policy con

  • Report Path in Application Server

    Can we have multiple paths for .rfd files in Application server 9ias? Actually we have two separate applications. We wanted to keep .rdf files in separate folders on app server. Is there a way when we run one application, it should check rdf files fr

  • Missing Points / $10 certificate from Preorder

    Hi BestBuy Community, Has anyone receive their $10 pre order bonus from the Assasins Creed Unity? It's been well over 30 days now and I see that points were given but it does not reflect the current balance. I have private messaged a MOD but no respo

  • MacBook Pro gets a flashing folder with a question mark

    I start up my computer and I get this flashing folder with a question mark. I looked up on here how to fix it but I get lost when I get to the disk utility part. All that shows up is something called disk0 and below it it says Mac OS X Base System. I

  • RAC TO RAC CLONING ERROR IN EBS R12

    Hi , Hussain i need your support in this issue i am facing the same error ... At the third stage of RMAN restore ...