Printing in only last line item printing in main window

Hi All,
My requiremnet is to print same data in two blocks for F110 payment cheque
Iam using 2 main windows to print same data if block exceeds it will go to next page
iam calling the windows as shown below
CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        window   = 'MAIN00'
        element  = hlp_ep_element
        function = 'APPEND'
      EXCEPTIONS
        window   = 1
        element  = 2.
    IF sy-subrc EQ 2.
      err_element-fname = t042e-zforn.
      err_element-fenst = 'MAIN00'.
      err_element-elemt = hlp_ep_element.
      err_element-text  = text_525.
      COLLECT err_element.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        window   = 'MAIN01'
        element  = hlp_ep_element
        function = 'APPEND'
      EXCEPTIONS
        window   = 1
        element  = 2.
    IF sy-subrc EQ 2.
      err_element-fname = t042e-zforn.
      err_element-fenst = 'MAIN01'.
      err_element-elemt = hlp_ep_element.
      err_element-text  = text_525.
      COLLECT err_element.
    ENDIF.
Iam getting only last line item printing in main window
Please provide the inputs.
Thanks,
Kamalakar.
Please use code tags.
Edited by: Rob Burbank on Nov 25, 2011 11:51 AM

Hi,
My requirement was to print same block twice in cheque printing of F110.
I have used the function module  'WRITE_FORM_LINES' to print more than one line item in secondary window in the script .
fill the Lines internal table as shown below.
Example :
    lines-tdformat = 'TM'.
    CONCATENATE regup-xblnr ',,' w_date ',,'  w_bsak-sgtxt ',,' w_gross ',,' w_dis ',,'
    w_net INTO lines-tdline.
APPEND lines.
CALL FUNCTION 'WRITE_FORM_LINES'
      EXPORTING
       function                       = 'APPEND'
       header                         =  header_t
       type                           = 'BODY'
       window                         = 'MAIN01'
    IMPORTING
      FROMPAGE                       =
      PENDING_LINES                  =
      TABLES
        lines                          = lines
     EXCEPTIONS
       function                       = 1
       type                           = 2
       unopened                       = 3
       unstarted                      = 4
       window                         = 5
       bad_pageformat_for_print       = 6
       spool_error                    = 7
       codepage                       = 8
       OTHERS                         = 9
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.

Similar Messages

  • How to determine Last Lite Item of a Main Window in SCRIPTS

    Hi All,
    I have a requirement <b>to print a value after all the Line Items have been printed in a main window.</b>
    The question is <b>how do I determine the end of Line Items</b>?
    Also, this needs to be done without a change in the print program.
    Please suggest your valuable opinions.
    Thanks & Regards,
    Arun

    Hi yerram,
    1. There is no direct way,
       to know which is the last line time getting printed,
       (from inside the sapscript)
    2. Bcos, the sequence is controlled by the driver program.
    3. What u can do is check the driver program and the layout,
       to detect,
       some ELEMENT
       which must be getting printed, after all the line items are printed.
      (inside that element, u can write your own
       text to get printed)
    regards,
    amit m.

  • How to draw a box before Line Item in the Main Window  In SapScript

    Hi guys,
    I am trying to draw a box before Line items to be printed but it overwriting the Line Item can anyone help me in this.
    Thanks,
    Ramesh

    Hi ramesh,
    check this:
    /E   TOP
       plant,,status,,GROUP,,Profit,,Min.Size,,Max.Size
    /:   BOX FRAME 10 TW
    /:   BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW
    /*   BOX XPOS 15 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 28 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 35 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 42 CH WIDTH 0 CM FRAME 10 TW
    /*   BOX XPOS 55 CH WIDTH 0 CM FRAME 10 TW
    /E   NEW
       &IT_SCRIPT-pstat(C)&,,&IT_SCRIPT-werks(C)&,,
    =    &IT_SCRIPT-EKGRP(C)&,,&IT_SCRIPT-PRCTR(C)&,,
    =    &IT_SCRIPT-MINLS(C)&,,&IT_SCRIPT-MAXLS(C)&
    /:   BOX FRAME 10 TW
    /:   BOX YPOS 2 CH HEIGHT 0 CM FRAME 10 TW
    /:   BOX XPOS 15 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 28 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 35 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 42 CH WIDTH 0 CM FRAME 10 TW
    /:   BOX XPOS 55 CH WIDTH 0 CM FRAME 10 TW
    the corresponding code in abap editor:
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
       APPLICATION                       = 'TX'
       ARCHIVE_INDEX                     =
       ARCHIVE_PARAMS                    =
       DEVICE                            = 'PRINTER'
       DIALOG                            = 'X'
        FORM                              = 'ZFINAL_13688'
        LANGUAGE                          = SY-LANGU
      EXCEPTIONS
        CANCELED                          = 1
        DEVICE                            = 2
        FORM                              = 3
        OPTIONS                           = 4
        UNCLOSED                          = 5
        MAIL_OPTIONS                      = 6
        ARCHIVE_ERROR                     = 7
        INVALID_FAX_NUMBER                = 8
        MORE_PARAMS_NEEDED_IN_BATCH       = 9
        SPOOL_ERROR                       = 10
        CODEPAGE                          = 11
        OTHERS                            = 12
    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 'WRITE_FORM'
                        EXPORTING
                          ELEMENT                        = 'TOP'
                        FUNCTION                       = 'SET'
                          TYPE                           = 'TOP'
                          WINDOW                         = 'MAIN'
                        EXCEPTIONS
                          ELEMENT                        = 1
                          FUNCTION                       = 2
                          TYPE                           = 3
                          UNOPENED                       = 4
                          UNSTARTED                      = 5
                          WINDOW                         = 6
                          BAD_PAGEFORMAT_FOR_PRINT       = 7
                          SPOOL_ERROR                    = 8
                          CODEPAGE                       = 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.
    LOOP AT IT_SCRIPT.
      CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'NEW'
        FUNCTION                       = 'SET'
         TYPE                           = 'BODY'
         WINDOW                         = 'MAIN'
       EXCEPTIONS
         ELEMENT                        = 1
         FUNCTION                       = 2
         TYPE                           = 3
         UNOPENED                       = 4
         UNSTARTED                      = 5
         WINDOW                         = 6
         BAD_PAGEFORMAT_FOR_PRINT       = 7
         SPOOL_ERROR                    = 8
         CODEPAGE                       = 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.
      ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
       UNOPENED                       = 1
       BAD_PAGEFORMAT_FOR_PRINT       = 2
       SEND_ERROR                     = 3
       SPOOL_ERROR                    = 4
       CODEPAGE                       = 5
       OTHERS                         = 6
    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,
    keerthi.

  • Only the last line item is shown in main window...

    Hello Experts,
    I created a custom form for the standard checque program RFFOUS_C. Now, in my MAIN window, I
    called a subroutine in a custom program which loops through the line items but the problem is
    only the last line item is being shown. I tried using CONTROL_FORM to create a new line
    but it does not work. Note that I did not customize RFFOUS_C since it is being used by
    multiple companies. Below is my code:
    SAPSCRIPT:
    510-C
    Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    DEFINE &LTYC_XBLNR& = ''
    DEFINE &LTYC_BLDAT& = ''
    DEFINE &LTYC_SGTXT& = ''
    DEFINE &LTYC_DMBTR& = ''
    PERFORM WRITE_LINE_ITEMS IN PROGRAM Z9999RFI_Z2574FFI_RA
    USING &REGUH-LAUFD&
    USING &REGUH-LAUFI&
    USING &REGUH-XVORL&
    USING &REGUH-ZBUKR&
    USING &REGUH-LIFNR&
    USING &REGUH-VBLNR&
    CHANGING &LTYC_XBLNR&
    CHANGING &LTYC_BLDAT&
    CHANGING &LTYC_SGTXT&
    CHANGING &LTYC_DMBTR&
    ENDPERFORM
    PROTECT
         &LTYC_XBLNR&     &LTYC_BLDAT&     &LTYC_SGTXT&     &LTYC_DMBTR&
    ENDPROTECT
    End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    PROGRAM:
    IF gt_regup[] IS NOT INITIAL.
        CALL FUNCTION 'OPEN_FORM'
           EXPORTING
    *         APPLICATION                       = 'TX'
    *         ARCHIVE_INDEX                     =
    *         ARCHIVE_PARAMS                    =
    *         DEVICE                            = 'PRINTER'
    *         DIALOG                            = 'X'
             form                              = lcc_z2574ffi_ra
    *         LANGUAGE                          = SY-LANGU
    *         OPTIONS                           =
    *         MAIL_SENDER                       =
    *         MAIL_RECIPIENT                    =
    *         MAIL_APPL_OBJECT                  =
    *         RAW_DATA_INTERFACE                = '*'
    *         SPONUMIV                          =
    *       IMPORTING
    *         LANGUAGE                          =
    *         NEW_ARCHIVE_PARAMS                =
    *         RESULT                            =
           EXCEPTIONS
             canceled                          = 1
             device                            = 2
             form                              = 3
             OPTIONS                           = 4
             unclosed                          = 5
             mail_options                      = 6
             archive_error                     = 7
             invalid_fax_number                = 8
             more_params_needed_in_batch       = 9
             spool_error                       = 10
             codepage                          = 11
             OTHERS                            = 12.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        LOOP AT gt_regup INTO lw_regup.
          m_line_items 'LTYC_XBLNR' lw_regup-xblnr.
          m_line_items 'LTYC_BLDAT' lw_regup-bldat.
          m_line_items 'LTYC_SGTXT' lw_regup-sgtxt.
          m_line_items 'LTYC_DMBTR' lw_regup-dmbtr.
          DELETE ex_output WHERE value IS INITIAL.
          CALL FUNCTION 'WRITE_FORM'
           EXPORTING
             element                        = '510-C'
             function                       = 'APPEND'
    *         TYPE                           = 'BODY'
             window                         = 'MAIN'
    *       IMPORTING
    *         PENDING_LINES                  =
           EXCEPTIONS
             element                        = 1
             function                       = 2
             type                           = 3
             unopened                       = 4
             unstarted                      = 5
             window                         = 6
             bad_pageformat_for_print       = 7
             spool_error                    = 8
             codepage                       = 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.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 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.
        ENDLOOP.
        CALL FUNCTION 'CLOSE_FORM'
    *       IMPORTING
    *         RESULT                         =
    *         RDI_RESULT                     =
    *       TABLES
    *         OTFDATA                        =
           EXCEPTIONS
             unopened                       = 1
             bad_pageformat_for_print       = 2
             send_error                     = 3
             spool_error                    = 4
             codepage                       = 5
             OTHERS                         = 6.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.

    Hi,
    Write the at last event in the program and check if it works
      At last.
           CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 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.
    Regards,
    Sravanthi

  • SAPF150D-Dunning Notice Print - With Update of Line Items and Master Record

    When I am running this program SAPF150D(Dunning Notice Print - With Update of Line Items and Master Records) with a variant containing run date, runc id, update mode, pimmed & pcount; the job is failing to execute. It is giving message like,
    "The field symbol is no longer assigned because there was an attempt makde previously in a Unicode program to set the field symbol using ASSIGN with offset and/or length specification. Here, the memory addressed by the offset/length specification was not within the allowed area."
    "GETWA_NOT_ASSIGNED_RANGE" "SAPF150D" or "F150DFS0" "SORTFELDER_ERMITTELN"

    Hi,
    Search for routine FORM SORTFELDER_ERMITTELN
    in SAPF150D.
    Put a breakpoint in statement
    ASSIGN (T047F-FELDN) TO <H1>.
    in above routine and debug to the point where error is occuring.
    Most likely there is a mismatch in the length assigned to some field FELDN in table T047F.
    In that case, simply change the T047F-LENGT field accordingly in change mode.
    Cheers,
    Vikram
    Edited by: Vikram Jalali on May 27, 2008 5:56 PM

  • GL line item printing

    Hi Experts
    When we print out the GL line item (transaction FS10N), is there any way we are able to capture the date, time and user ID of person generating the list in the printout.
    I know one way is via the printing of the cover sheet but we would like to capture this information in the same printout as the line item listing and not in a separate sheet of paper.
    Hope someone could advise.
    Thank you!

    Hi Paul
    Yes, this is what I am looking for. Noted that there is also an option to insert parameters in the header but it is not selectable. Do you know how to incoporate certain selection parameters (eg posting period) so that it is printed in the header as well?
    Hope you are able to advise.
    Thanks.

  • Fields only to be displayed for last line item

    I copied WESCHEINVERS3( goods receipt form) script to zxxxx and placed some fields  in Main window using Perform statement. When i am displaying the output these fields are getting displayed under each line item. but i want them to be displayed under last line item.Please suggest how can i do this.
    Thanks
    K Srinivas

    data: v_cnt1 type i, v_cnt2 type i.
    count the number line item using describe lines statement in V_cnt1
    and in the table loop count the number of item into V_cnt2.
    place the field that you want at the end of all line item in the footer of the table and put  a condition in the condition tab v_cnt1 = v_cnt2.

  • Final total cannot appear when the last line item reached the page end

    Hi All,
    My report included 2 pages. Problem is the final total cannot appear when the last line item reached the page end. (page 2)
    final total will appear on the middle of last page (page 3) when i comment (type    = 'BOTTOM').
    Below is the program.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          device   = 'PRINTER'
          dialog   = 'X'
          form     = 'ZBOTM_VOUCHER'
          language = sy-langu.
      sort itab by vblnr.
      LOOP AT itab INTO wa_itab.
        move wa_itab-vblnr to reguh-vblnr.
        move wa_itab-lifnr to reguh-lifnr.
        move wa_itab-rbetr to reguh-rbetr.
        reguh-rbetr = reguh-rbetr * -1.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            window  = 'MAIN'
            element = 'DETAIL'.
        t_rbetr = reguh-rbetr + t_rbetr.
        AT LAST.
          CALL FUNCTION 'WRITE_FORM'
            EXPORTING
              window = 'LINE'.
          CALL FUNCTION 'WRITE_FORM'
            EXPORTING
              element = 'TOTAL'.
              type    = 'BOTTOM'
              WINDOW  = 'MAIN'.
        ENDAT.
    Thanks.

    Hi,
    Where should I include the code for bottom?
    How to open text editor?
    Thanks.
    Edited by: Alice8 on Feb 7, 2011 9:09 AM

  • Capture last line item

    I have a requirement where in i have to display a pop up with all the line items given by user in ME21N . The pop up has to display when user presses CHECK .
    I written the code in the exit EXIT_SAPMM06E_017 . its working fine for single line item.
    In case of multiple line items the popup appears for every line item instead of showing all the line items in a single pop up since in the user exit there is no provision of capturing the LAST LINE ITEM . The field EKKO-LPONR which captures the last line item , is populated only after the exit is triggered which captures the value of EKPO-EBELP( line-item). I manage to capture the line items in internal table but unable to capture last line item and then display the internal table in pop up .
    If the user gives two line items say 10 , 20 .
    Line item 10 is populated to field EKPO-EBELP . After the control comes out of the exit the value of EBELP is assigned to LPONR . At next control LPONR = 10 and EBELP = 20.
    Thanks .

    Hi Priya,
    To show popup for the last line item, try with this logic:
    You have an internal table with all line items, take an internal table with same structure. Take the number of lines and read the line iten into work area and append this work area into another table. after that read this second internal table with EBELN and EBELP, if it is matching then show the popup for all line items from first internal table.
    Put this code:
    <b>dsescribe int_first into ws_lines.
    if ws_lines gt 0.
    read table int_first into wa_first index ws_lines.
    if sy-subrc eq 0.
      append wa_first to int_second.
    endif.
    endif.
    if not int_second is initial.
    read int_second into wa_first with key EBELN = 'structure ebeln value'
                                                            EBELP = 'structure ebelp value'
      if sy-subrc eq 0.
       " put POPUP code
      endif.
    endif.</b>
    Hope it will solve ur problem.

  • Select last line item from VBAP

    Dear SAP experts,
    This might sound very silly question but I am new to SAP world.
    is there a simple select statement to select only higest line item.
    Say for example in VBAP, I have 9 line items.
    then my select statement should find the last line item. ie. 9th item.
    Actually, I have a situation where a custom table has 2 key fields and I want to select the only 1 line with higest number in 2nr column. Thank you.
    Anitha.

    Hi,
    types: BEGIN OF ls_vbap,
             vbeln TYPE vbap-vbeln,
             posnr TYPE vbap-posnr,
           END OF ls_vbap.
    DATA : t_vbap TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
           wa_vbap type ls_vbap.
    data: lv_line type int4.
    SELECT vbeln posnr FROM kna1 INTO TABLE t_vbap.
    *****If you just need the last record then write the code  as shown below:
    DESCRIBE TABLE t_vbap LINES lv_line.
    READ TABLE t_vbap INTO wa_vbap INDEX lv_line.
    if sy-subrc = 0.
    write:/ wa_vbap-vbeln.
    endif.
    If you the need the last record after sorting then use the below code:
    SORT t_vbap by vbeln posnr DESCENDING.
    READ TABLE t_vbap into wa_vbap index 1.
    if sy-subrc = 0.
    write:/ wa_vbap-vbeln.
    endif.

  • Module pool- only first line item data saved, rest disappears??

    Hi Experts,
    I have one module pool that was developed by other developer. It has header details input fields and items details input by table control.
    Now below scenarios occur:
    1) When I enter only one line item, and save it, the data is saved properly
    2) when I enter more than one item data and save it, it only saves first line item data.
    3).When I press ENTER button after every new line item data, it saves all the data properly.
    I tried to debug the report but could not find the exact problem statement as the code is written very badly without any comments.
    I am pasting the flow logic code below for the screen.
    So please help me figure out the problem and solution for it.
    +++++++++++++++++++++++++++++++++++
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
       MODULE it_mseg_change_tc_attr.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
       LOOP AT   it_gp
            INTO wa_gp
            WITH CONTROL it_mseg
            CURSOR it_mseg-current_line.
         MODULE it_mseg_get_lines.
    *&SPWIZARD:   MODULE IT_MSEG_CHANGE_FIELD_ATTR
       ENDLOOP.
    * MODULE STATUS_9001.
       MODULE deactive_screen.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
       LOOP AT it_gp.
         CHAIN.
           FIELD wa_gp-yposnr.
           FIELD wa_gp-matnr.
           FIELD wa_gp-maktx.
           FIELD wa_gp-meins MODULE check_uom ON INPUT..
    *      FIELD WA_GP-DOC_QTY.
    *      FIELD WA_GP-REC_QTY.
           FIELD wa_gp-gp_qty.
           FIELD wa_gp-chall_qty.
           FIELD wa_gp-netwr.
           FIELD wa_gp-remarks.
           FIELD wa_gp-exp_ret.
           MODULE it_mseg_modify ON CHAIN-REQUEST.
         ENDCHAIN.
         FIELD wa_gp-chk
           MODULE it_mseg_mark ON REQUEST.
       ENDLOOP.
       MODULE it_mseg_user_command.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
       MODULE user_command_9001.
    +++++++++++++++++++++++++++++++++++
    Thanks,
    Vishal.

    Hi Aruna,
    Below is the code as you required.
    +++++++++++++++++++++++++++++
    MODULE user_command_9001 INPUT.
       ygp_header_mas-ret_type = v_gpt.
       CASE sy-ucomm.
         WHEN 'MBLNR'.
           PERFORM select_mblnr.
         WHEN 'DEL'.
           PERFORM select_delivery.
         WHEN 'INTI'.
           PERFORM grt_gi_details.
         WHEN 'GENT'.
           PERFORM get_ge_details.
         WHEN 'GP'.
           PERFORM get_returnable_gp.
         WHEN 'SAVE'.
           PERFORM gen_gp_number.
           PERFORM gen_data.
           PERFORM save_data.
         WHEN OTHERS.
           PERFORM get_ge_details_other.
           IF it_gp[] IS INITIAL.
             INSERT INITIAL LINE INTO it_gp INDEX 1.
           ENDIF.
       ENDCASE.
       IF v_entry = 07 .
         PERFORM serial_no1.
         PERFORM insert_row.
       ENDIF.
       IF sy-ucomm IS INITIAL.
         PERFORM calc_amt.
       ENDIF.
       CLEAR:sy-ucomm.
    ENDMODULE.                    "user_command_9001 INPUT
    +++++++++++++++++++++++++++++++
    MODULE it_mseg_user_command INPUT.
       ok_code = sy-ucomm.
       PERFORM user_ok_tc USING    'IT_MSEG'
                                   'IT_GP'
                                   'CHK'
                          CHANGING ok_code.
       sy-ucomm = ok_code.
    ENDMODULE.                    "IT_MSEG_USER_COMMAND INPUT
    ++++++++++++++++++++++++++++++++++
    MODULE it_mseg_modify INPUT.
       MODIFY it_gp
         FROM wa_gp
         INDEX it_mseg-current_line.
    ENDMODULE.                    "IT_MSEG_MODIFY INPUT    
    ====> Above module has some problem i think as while debugging it was not updating IT_GP as the current line number was not matching with IT_GP as it has only one line item and WA_GP was changing. Also WA_GP data was getting changed with LOOP with all line items data.
    ++++++++++++++++++++++++++++++++++++++++++++++
    MODULE it_mseg_mark INPUT.
       DATA: g_it_mseg_wa2 LIKE LINE OF it_gp.
       IF it_mseg-line_sel_mode = 1
       AND wa_gp-chk = 'X'.
         LOOP AT it_gp INTO g_it_mseg_wa2
           WHERE chk = 'X'.
           g_it_mseg_wa2-chk = ''.
           MODIFY it_gp
             FROM g_it_mseg_wa2
             TRANSPORTING chk.
         ENDLOOP.
       ENDIF.
       MODIFY it_gp
         FROM wa_gp
         INDEX it_mseg-current_line
         TRANSPORTING chk.
    ENDMODULE.                    "IT_MSEG_MARK INPUT
    +++++++++++++++++++++++++++++++++++++++++
    If I press ENTER after entering each line item, all records come in IT_GP but if not then only first line item comes. Also if I dont press ENTER after entering the first line item and and add one item (total 2) and then press ENTER then sometimes both the lines disappear.
    Thanks,
    Vishal

  • New B209a has poor printing on every third line. Prints pictures ok.

    new B209a has poor printing on every third line. Prints pictures ok .Have all new ink and ran alingment and print head cleaning

    Sorry that you are having a problem printing documents. Try to print a self test page or printer status report from the printer itself, and see if you get the same results. 
    Also try to make a copy of a document, and see if the poor printing continues. 
    Have you MANUALLY cleaned the print head? If you can take the print head out, clean with lint free cloth and water. 
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

  • How to add new line item based on main item using crm_order_maintain

    Hi All,
    can you please provide a way to create a new line item based on main line item and save in crm transaction( in house repair order) by using crm_order_maintain(from SAP GUI).
    Thanks,
    vinod.

    Hi Vinod,
    The relationship with main item is stored with CRMD_ORDERADM_I- Parent.
    You need to pass the guid of main item to orderadm_i-parent. This will keep the relationship with main item.
    Thanks
    Ajay

  • Auc line item settlement to main assets

    Dear all ,
    We settled AUC assets Building  no.91000002 in main assets Building No. 40000005 from using T-Code aibu and aiab. , we select line item to settle in main assets. After settling we got document no. eg. 4000002 ,, but i want see all line item settled to main document no 400002 ,  i have check SE16 table ANEKPV not showing my settled line item ,, pls give any tcode which  line item selected to settled to eg.document no 400002. but we not using order no , wbs , project , i have check tocde KO88, AB03,CJID, kO02, AR01 Not find ,  how to know my selected line item, more details find the attachment ..pls help me
    Regads
    Ajay

    Dear Sir,
    Thank for reply  ,  i have checked e.g doc no - 1234561. then go environment and click original document, when i select it show two line item (list of assets document ) when i select main assets docs then go to overview assets docs , not go to CJ88 , so i am not able to resolve this issue , Pls help me ,,,
    if anybody know pls give me ans asap,,,,
    thanks
    Regards
    Ajay

  • Problem with line items print in Script MAIN window.

    Dear Friends,
    I am facing a problem with display the line items in main window.
    Here i have created my form with 2 pages,
    in first page i have created header window(my header information is full length of page), in second page i have created 2 windows, one for MAIN window and second for FOOTER window,
    i am having the Footer information about to off the page.
    and in my main window total 3 line items are coming, if i am having 3 line items then it is displaying properly (first 3 line items then immediately footer information on same page) but if am having more then 3 line items say four, then in my second page first it is printing 3 line items then it is switching into another page. After that footer is coming but. in previous page after printing 3 line items the remaining page is empty..
    my client want me to remove that place also. he wants to display continue..
    i think so u people r understand what is my problem...pls advice me what i want to do to solve this problem.
    Thanks
    Sridhar.

    Hi Sridher,
    If you want to display the footer information only on the last page why dont you use a table to display your details and place the footer details in the table footer instead of a seperate footer window.
    Regards,
    Vidya.

Maybe you are looking for