HOW TO GET  PROPER OUTPUT OF COPIED STANDARD PROGRAM OF  MB51

I HAVE COPIED THE STANDARD PROGRAM OF MB51 TRANSACTION INTO Z-PROGRAM. NOW, I WANT PLANT, PLANT DESCRIPTION,MATERIAL NO,MATERIAL DESCRIPTION,MOVEMENT TYPE, MOVEMENT TYPE TEXT,QUANTITY,BASE UNIT OF MEASURE, AMOUNT OF CURRENCY AS OUTPUT  IN ALV-GRID FORMAT. I AM ABLE TO DISPLAY THE OUTPUT NORMALLY  IN ALV-GRID FORMAT IN THE FOLLOWING WAY:
PLANT-NO    PLANT- DESC  MAT-NO    MAT-DES   MOV-TYP      MOV-DES
1000               YYY                100           UUU           351                 EE        
QUAN    BA              C
200       TO               2000
500                         1500                                        451           
600                          1500                                       451           
THE ABOVE IS THE SAMPLE OUTPUT OF THE REQUIRED FIELDS.
IN THE ABOVE OUTPUT ,
QUAN                 =                     QUANTITY
BA                      =                     BASE UNIT OF MEASURE
C                       =                     AMOUNT IN LOCAL CURRENCY
MOVE-TYPE       =                     MOVEMENT TYPE.
MOVE-TYPE       =                     MOVEMENT TYPE TEXT
MAT-NO              =                     MATERIAL NUMBER.
MAT-DESC          =                     MATERIAL DESCRIPTION.
PLANT                =                     PLANT NUMBER.
PLANT DESC      =                     PLANT DESCRIPTION.
IN THE ABOVE MENTIONED SAMPLE OUTPUT,
PLANT NUMBER-1000 HAS TWO MOVEMENT-TYPES 351 AND 451.
IN THIS ,351- MOVEMENT TYPE HAS QUANTITY-200.
            451 -MOVEMENT TYPE HAS QUANTITY-500,CURRENCY-1500
            451 -MOVEMENT TYPE HAS QUANTITY-600,CURRENCY-1500
AS OF NOW, DIFFERENT MOVEMENT TYPES ARE DISPLAYED WITH DIFFERENT QUANTITIES IN DIFFERENT ROWS. I WANT THE OUTPUT TO BE DISPLAYED IN SAME ROW. THAT MEANS, IN THE ABOVE EXAMPLE, 451 IS REPEATED 2 TIMES WITH QUANTITIES 500 AND 600  RESPECTIVELY. I WANT THESE QUANITITIES TO BE ADDED  AND DISPLAYED IN THE COMMON LINE AS FOLLOWS:
PLANT-NO    PLANT- DESC  MAT-NO    MAT-DES   MOV-TYP      MOV-DES
1000               YYY                100           UUU           351                 EE
QUAN    BA              C
200       TO               2000
1100      TO               3000                                          451
IN THE ABOVE REQUIRED OUTPUT, 451 MOVEMENT TYPE WHICH IS HAVE HAVING 500,600 AS QUANTITIES AND 1500,1500 AS CURRENCIES ARE ADDED AND DISPLAYED ON THE SAME LINE. I WANT THE OUTPUT IN THIS WAY.
THAT MEANS, FOR EACH PLANT, FOR EACH MATERIAL NUMBER ,FOR EACH MOVEMENT TYPE THE COREESPONDING QUANTITES AND CURRENCIES HAS TO BE ADDED AND DISPLAYED ON THE SAME LINE.
I WANT THE REQUIRED OUTPUT IN THE ABOVE SAID FORMAT.
IF U DON'T UNDERSTAND ANY OF THE PART OF THE ISSUE EXPLAINED , PLEASE REPLY TO ME SO THAT I CAN CLEAR THAT PART BY EXPLAINING TO YOU MORE CLEARLY.
THIS IS VERY URGENT REQUIREMENT. PLEASE SUGGEST THE SOLUTION AS SOON AS POSSIBLE. POINTS WILL BE AWARDED.
THANKING U IN ADVANCE.
SRINIVAS.

Hi ,
Create an internal table it_finla1 which has all the fields of  the final internal table say it_final for alv displlay exect movement type (bwart), ,.
Now before the final alv display,use this code.
loop at it_final.
move-corresponding it_final to it_final1.
collect it_final1.
endloop.
Now, it_final1 is the table for alv display.
Hope this solves ur query.

Similar Messages

  • I'm not getting proper output as per the Program

    Hi Experts,
             As i'm executing my ALV report regarding Customer Invoice on Production client I'm not getting proper output as per the program but when i execute the same report on Development client i'm getting proper output.
          Can anybody tell me how can i resolve this problem on production client? 
          Actually i've updated my report on my old report but still i'm getting old output of my report on production client, Program is showing updated code but at execution i'm getting old output.

    FORM Z_CREATE_FIELD_CATALOG.
    I_FCAT-FIELDNAME = 'BUKRS'.
      I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '00006'.
      I_FCAT-SELTEXT_L = 'Comp.Code'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'BELNR'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000013'.
      I_FCAT-SELTEXT_L = 'Document No'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'KUNNR'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000013'.
      I_FCAT-SELTEXT_L = 'Customer Code'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'NAME'.
    I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '000015'.
      I_FCAT-SELTEXT_L = 'Customer Name'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'GJAHR'.
    I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '000005'.
      I_FCAT-SELTEXT_L = 'Fscl.Yr'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'KOSTL'.
    I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '000008'.
      I_FCAT-SELTEXT_L = 'Cost Center'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'XBLNR'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000016'.
      I_FCAT-SELTEXT_L = 'Invoice No'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
       I_FCAT-FIELDNAME = 'SGTXT'.
    I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '000015'.
      I_FCAT-SELTEXT_L = 'Item Text'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'BUDAT'.
    I_FCAT-OUTPUTLEN = '000015'.
      I_FCAT-SELTEXT_L = 'Posting Date'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'MWSKZ'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '0000010'.
      I_FCAT-SELTEXT_L = 'Tax Code'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'TAXTXT'.
    I_FCAT-HOTSPOT   = 'X'.
      I_FCAT-OUTPUTLEN = '0000015'.
      I_FCAT-SELTEXT_L = 'Tax Description'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'HKONT'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000013'.
      I_FCAT-SELTEXT_L = 'G/L Account'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'WRBTR'.
    I_FCAT-OUTPUTLEN = '000018'.
      I_FCAT-SELTEXT_L = 'Net Amount'.
       I_FCAT-cfieldname    = 'PSWSL'.
      I_FCAT-DO_SUM = 'X'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'HKONT2'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000013'.
      I_FCAT-SELTEXT_L = 'Tax G/L No.'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'WRBTR2'.
    I_FCAT-OUTPUTLEN = '000018'.
      I_FCAT-SELTEXT_L = 'Tax Amount'.
       I_FCAT-cfieldname    = 'PSWSL'.
      I_FCAT-DO_SUM = 'X'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    I_FCAT-FIELDNAME = 'HKONT1'.
    I_FCAT-HOTSPOT   = 'X'.
    I_FCAT-OUTPUTLEN = '000013'.
      I_FCAT-SELTEXT_L = 'Freight G/L No'.
    I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'WRBTR1'.
    I_FCAT-OUTPUTLEN = '000018'.
      I_FCAT-SELTEXT_L = 'Freight Amount'.
       I_FCAT-cfieldname    = 'PSWSL'.
      I_FCAT-DO_SUM = 'X'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'GROSS'.
    I_FCAT-OUTPUTLEN = '000018'.
      I_FCAT-SELTEXT_L = 'Gross Amount'.
      I_FCAT-DO_SUM = 'X'.
       I_FCAT-cfieldname    = 'PSWSL'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
      I_FCAT-FIELDNAME = 'PSWSL'.
    I_FCAT-OUTPUTLEN = '000018'.
    I_FCAT-OUTPUTLEN = '000004'.
      I_FCAT-SELTEXT_L = 'Curr.'.
      I_FCAT-DO_SUM = 'X'.
      I_FCAT-FIX_COLUMN = 'X'.
      APPEND I_FCAT.
      CLEAR  I_FCAT.
    LS_SORT-UP = 'X'.
      LS_SORT-FIELDNAME = 'BELNR'.
        APPEND LS_SORT TO I_SORT.
        CLEAR LS_SORT.
    LAYOUT-ZEBRA = 'X'.
    ENDFORM.

  • How to get the output of a standard report  RFBILA00 in PDF form.

    hi,
    I have to get the output of the standard report RFBILA00 in the PDF form.
    Thanks.

    Hi Rao,
    you can run your report RFBILA00 in background  and in background  job you can add one more step, next in that step you can add custom  report like zsubmit .
    job should be set like
    step1:  RFBILA00 with variant.
    Step2:  zsubmit report with variant.
    In Zsubmit report  you can  read, your first step spool using FM GET_JOB_RUNTIME_INFO
    and pass that spool  in the FM  CONVERT_ABAPSPOOLJOB_2_PDF.
    when second  report run in job  you can set your target like download in the server or  send email etc.
    Regards,
    Prasenjit

  • How to get the output data of Standard drill down report into z-program?

    HI every one,
            I want to get the output data of drill down report into z-program.
           Actually,if the output is only one, I can get into z-program,
          But, Here the report consists 3 alv outputs. when double clicking function happens, it will direct to another alv output.
        Those, all the outputs of report i want to get into z-program.
    PLease , give reply as early as possible.
    Thank u in advance,
    karthik

    HI,
      When i download,only one output i will get.
      But,if i double-click the particular record it will show another output. I want that output also.
      Like that,when i double-click particular record, it will show some other alv ouput based on record,     
    i wanted all those outputs.
    If  i copy the code, whether i face any problems?

  • Getting the internal table of standard program to my custom program

    Hi All,
    I have a requirement in which i have to get the data from internal table ALV_ITAB from program HKBRO20. As this is the standard program, i have copied this program into Z custom program and using export parameter i am getting the data from internal table ALV_ITAB to my custom program (Using submit of the Z of the standard program). Can any one pls tell me whether the process i am following is correct if not pls tell me how to get the internal table from standard program to our custom program.
    the process i am following
    submit ZHBRO20 and return. IMPORT ALV_ITAB  FROM MEMORY ID 'ABC'.
    copied HBRO20 to ZHBRO20.
    Thanks,
    Raju

    Hi,
    you could also try
    FIELD-SYMBOLS: <fc> .
    CONSTANTS: c_table(21)  VALUE '(PROGRAM_NAME)INTERNAL_TABLENAME[]'.
    ASSIIGN (c_table) TO <fc>.
    Depends on the process, of course.
    Cheers,
    Stefan.

  • 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 get Information Template fields to Standard Purchase order Document.

    Hi Guy's
    I Created Information Templates to capture extra information to suit our business needs. But i dont know how to get populate those information into Standard Purchase order docuemnt. After Some research I found that we have to customize the PO_STANDARD_XSLFO.xsl. But i did not get how to get those information.
    If any one know knows or has done this type of customization let me know asap
    Thanks in advance
    Thanks & Regards
    Palakondaiah.U

    Hi,
    I resolved this as following :
    Since, i needed the Manufacturer Serial no. to be fetched in custom field at item level ( Enhanced via EEWB the item  ) , the moment there is a product  available in the sales doc header field.
    I wrote  badi implementation for definition : CRM_ORDERADM_I_BADI and utilized method  : CRM_ORDERADM_I_PRODUCT_DETERM . This method's signature if you check makes me available the header, item guids along with the product available in the field even before i save the sales document. There i fetch the serial number of product from custom table and then poulate the serial no. field in customer_i extension as follows:
      LS_CUSTOMER_I_COM-ZZCUSTOMER_I0803 = LV_MFR_SLNO.
      LS_CUSTOMER_I_COM-REF_GUID    = IV_ITEM.
      LS_CUSTOMER_I_COM-REF_HANDLE  = '0000000000'.
      LS_CUSTOMER_I_COM-MODE        = 'A'.
      APPEND LS_CUSTOMER_I_COM TO LT_CUSTOMER_I_COM.
      LS_FIELD_NAME_CUSTAB-FIELDNAME = 'ZZCUSTOMER_I0803'.
      APPEND LS_FIELD_NAME_CUSTAB TO LT_FIELD_NAME_CUSTAB.
      CALL FUNCTION 'CRM_CUSTOMER_I_MAINTAIN_OW'
        EXPORTING
          IS_CUSTOMER_I_COM    = LS_CUSTOMER_I_COM
    *        IV_EXTERNAL_CALL     = 'X'
        CHANGING
          CT_INPUT_FIELD_NAMES = LT_FIELD_NAME_CUSTAB
        EXCEPTIONS
          ITEM_CHANGE_ERROR    = 1
          ITEM_CREATE_ERROR    = 2
          ERROR_OCCURRED       = 3
          OTHERS               = 4.

  • 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 Transaction code for SAP standard report painter in FI

    Hi All -
       Please let me know, How to get the transaction code for Standard SAP report painter / report writer in FI module.
    These report painters are created thru GR51...
    Thanks,
    Kannan

    Please refer to [Creating Transaction Code For Report Painter Reports|http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CAgQFjAA&url=http%3A%2F%2Fdap-consulting.com%2Fyahoo_site_admin%2Fassets%2Fdocs%2FReport_Painter_Reports.47142031.pdf&ei=MiWYS5ilCYeOlAfn4pCGDQ&usg=AFQjCNEZ0YO6vJ97K24MbU_NI5ROTb5vJA&sig2=Ke-svnqddqrz8RMcTuEnaw].

  • How to get this output using sql query?

    Hi,
      How to get this output using sql query?
    Sno Name Age ADD Result
    1 Anil 23 delhi Pass
    2 Shruti 25 bangalor Pass
    3 Arun 21 delhi fail
    4 Sonu 23 pune Pass
    5 Roji 26 hydrabad fail
    6 Anil 28 delhi pass
    Output
    Sno Name Age ADD Result
    1 Anil 23 delhi pass
    28 delhi pass

    Hi Vamshi,
    Your query is not pretty clear.
    write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
    Regards,
    Kannan

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • Change Output format of standard program RFSZIS00

    Hi All,
    I want to change output format of standard program RFSZIS00 for this i copied this into Z program but i am not able to
    find out where final output table is populating because that program is not using any final internal table it's using EXRACT and
    another thing is all discription for field has given in German Language.
    It's a clasical report not an ALV.
    Edited by: Raj Singh on Jul 3, 2009 11:03 AM

    Dear Raj,
    as per the report mentioned by you, it is calling some subroutine to display the details.
    Just try to trace the WRITE statements and check if you can add your own include in this report to display the output as per your requirement.
    Regds,
    Anil

  • How to get the VARIANT name in the program

    Hi Guys,
    Can somebody tell me how to get  the VARIANT name in a program.
    I have to perform some code with specific variant only. So I want to check in program which variant has been used to call the program.
    Thanks,

    Hi,
    Variants are stored in table VARI and VARID.
    You can use RS_ALL_VARIANTS_4_1_REPORT to get all the variants for a report program.
    please check out the link below it will be helpful to you
    Re: Programs for a transaction variant
    Hope this helps.
    ashish

  • How to get the ANSI codes in the program

    Hi,
    In my program, I have to get the ANSI codes 30 and 31 in the program. After getting those codes, I have to concatenate with some other text and display in the report.
    Can someone tell me how to get these ANSI codes in the program..?
    Is there any function module to get the ANSI codes in the program. or Is there any other way to get the ANSI codes in the program.
    Please help me. It is quite urgent.
    Thanks in advance,
    Best Regards,
    Pradeep.

    hi check this ....
    How can I get Ascii value of any letter
    How can I get Ascii value of any letter.  Is there any function?
    This is how you do it : 
    report demtest.
    data : c.
    field-symbols : <n> type x.
    data : rn type i.
    c = 'A'.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    This will convert 'A' to 65.
    Tom Demuyt
    How to convert ascii value to character.
    If I give input as 65 (ascill value) I want display 'A'.
    Below logic is for convert from character to ascii value , now I want to know how to convert ascii value to character.
    Naveen
    report demtest.
    *going from A to 65
    data : c value 'A'.
    field-symbols : <n> type x.
    data : rn type i.
    assign c to <n> casting.
    move <n> to rn.
    write rn.
    *going from 66 to B
    data : i type i value 66.
    data : x type x.
    field-symbols : <fc> type c.
    move i to x.
    assign x to <fc> casting type c.
    move <fc> to c.
    write c.
    regards,
    venkat.

  • How to get original serial number to reload program onto new computer?

    How to get original serial number to reload program onto new computer?

    Hi rehe,
    Please check the KB: Find your serial number quickly  to find your serial number.
    You can contact our chat support for help in retrieving your serial number: Serial number and activation support
    Regards,
    Rave

Maybe you are looking for

  • Problem opening up internet pdf files

    I cannot open pdf files from the internet. If I try to open one, only a small black square appears in the upper left corner. This has only recently begun. I have tried reloading adobe reader but the results remain

  • Older Reader and Newer reader

    My boss has some CDs that has some service manuals for his hobby cars on them. They require Acrobat Reader 4.0 to view. The CDs have 4.0 on them so you can download it. When I tried to download it I got a registry error but his manuals still open. He

  • Macbook Pro Running Lion - Very Slow

    Hello, I have a Macbook Pro (see specs below). I upgraded to Lion and ever since have had extremely slow processing speeds. This includes simple menu navigation, internet, startup/down - pretty much everything. Do I need more RAM? I see that many in

  • Webcam on Envy 14 Beats only detects when the display is at a certain angle

    HP Envy 14t-1100 CTO beats edition Windows 7 64 "No webcam detected" using HP MediaSmart Webcam, webcam not showing under imaging devices in device manager  I've had my Envy 14 Beats for about 9 months, when I got it the webcam worked just fi

  • Infotype for Language Skills

    Hello SAP Gurus... Can someone help me with the infotype name/number where we can store language skills...? Cheers