Write statements after OO ALV

Hi,
i have the following problem. In a report we are using the set_table_for_first_display method for ALV display. In the ALV, once pressed the 'BACK' button we want to show per screen some WRITE commands. The lines are being short printed, but the program is not stoping at that point, and therefore going back to the selection screen. So, we are not able to see the content we are printing with the WRITE statements.
Anyone knows how to solve this???
Thanks to everyone...

Hello,
did you try the 'LEAVE TO LIST-PROCESSING'-Command before your write-statements ?
Regards Wolfgang

Similar Messages

  • Write statement after ALV

    Hello,
    I have a requirement where I am displaying the ALV using grid.
    Have a button on top.
    After ALV display, I select the row and press the button.
    The processing takes place like (Delivery creation).
    After this delivery creation, I have to display the log output.
    But the log has to be using the normal Write Statement.
    Like : Write: 'Delivery created : 1001;.
    I am trying this but my write is not working.
    The code isgetting executed when seen in debug but nothing displayed on screen.
    Any idea??
    Pranu

    Hi,
    add the  below command in the ALV exporting..
    ...  user_command   = 'USER_COMMAND'..
    and paste the code at the last ..
    FORM user_command USING r_ucomm     TYPE sy-ucomm
                            ls_selfield TYPE slis_selfield.
    IF sy-ucomm = 'YOur button'.
       LEAVE TO SCREEN 0.
    endif.
    ENDFORM.                    "USER_COMMAND
    Regards,
    Prabhudas

  • Write statement after alv display

    Hi Experts,
                      My requirement  is that  i am displaying an output of ALV List display, in the List display i have a button which undergoes updation of records in Ztable.After pressing the button now i have to display Total no of records in write statement in which i should not have ALV display(i need 2 screens ).
    Regards,
    Vikram Sukumar

    <li>I don't know how you are doing but I am able to display. try this sample program for double click event.
    REPORT  ztest_notepad.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
            adrnr TYPE t001-adrnr,
          END OF it_t001.
    TYPE-POOLS:slis.
    DATA:it_fieldcat   TYPE slis_t_fieldcat_alv,
         wa_fieldcat   LIKE LINE OF it_fieldcat.
    DEFINE fieldcat.
       wa_fieldcat-fieldname = &1.
       wa_fieldcat-tabname   = &2.
       wa_fieldcat-seltext_m = &3.
       append wa_fieldcat to it_fieldcat.
       clear  wa_fieldcat.
    END-OF-DEFINITION.
    START-OF-SELECTION.
       SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
       fieldcat: 'BUKRS' 'IT_T001' 'BUKRS',
                 'BUTXT' 'IT_T001' 'BUTXT',
                 'ADRNR' 'IT_T001' 'ADRNR'.
       CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           i_callback_program      = sy-repid
           i_callback_user_command = 'USER_COMMAND'
           it_fieldcat             = it_fieldcat
         TABLES
           t_outtab                = it_t001.
    *&      Form  USER_COMMAND
    FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
       IF r_ucomm = '&IC1'.
         WRITE 'Venkat'.
       ENDIF.
    ENDFORM.                    "USER_COMMAND
    Thanks
    Venkat.O

  • How to use Write statement along with ALV output

    Hi expert,
    currently i have a requirement where i am first displaying message with write statement and after that ALV should be displayed ...something like below:
    vendor number is wrong.
    material number is wrong.
    plant is wrong.
    and then here ALV output -list of records updated in the database.
    but as of now the ALV is shown first and when going back then the write message information is dispayed.
    can anyone help how we can get this in only one screen?
    Thanks!!!
    Rajesh

    May below example give you some idea.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it_kna1 OCCURS 0,
            kunnr TYPE kna1-kunnr,
            name1 TYPE kna1-name1,
            ort01 TYPE kna1-ort01,
          END OF it_kna1.
    DATA: it_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    START-OF-SELECTION.
      SELECT kunnr name1 ort01
        FROM kna1 INTO TABLE it_kna1 UP TO 10 ROWS.
    END-OF-SELECTION.
      WRITE:/ 'Write Statement Display' HOTSPOT ON.
    AT LINE-SELECTION.
      CLEAR it_fcat.
      it_fcat-fieldname = 'KUNNR'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'Customer'.
      APPEND it_fcat.
      CLEAR it_fcat.
      it_fcat-fieldname = 'NAME1'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'Customer Name'.
      APPEND it_fcat.
      CLEAR it_fcat.
      it_fcat-fieldname = 'ORT01'.
      it_fcat-tabname = 'IT_KNA1'.
      it_fcat-seltext_l = 'City'.
      APPEND it_fcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          it_fieldcat        = it_fcat[]
        TABLES
          t_outtab           = it_kna1[].

  • Write stat below alv report .if i use field  catalog.

    hi experts,
    i want to use write statment  after alv report.
    note: i am useing fieldcatalog.
    i got it if i use standard table with : end_of_list event event.
    thank you.

    Hi snk,
    1. It won't work in GRID display.
    2. The reason is when grid comes,
       it comes on a screen which has container and the grid control.
    3. Write statement is displayed on a special screen,
       which is generally used for list output.
       Normal screens (where we can put textboxes/checkboxes etc),
       do not support write statements.
    regards,
    amit m.

  • Need to use ALV instead of write:/ statement in this perform

    How can I use ALV within this perform instead of using Write:/ in it.
    Scroll the program. At the bottom there is use of write:/ statement.
    How to use ALV in this perform?
    FORM display_logfile .
      TYPES: BEGIN OF lt_openbal,
                bukrs TYPE bukrs,
                hkont TYPE hkont,
                augdt TYPE augdt,
                augbl TYPE augbl,
                zuonr TYPE dzuonr,
                gjahr TYPE gjahr,
                belnr TYPE belnr_d,
                buzei TYPE buzei,
                shkzg TYPE shkzg,
                dmbtr TYPE dmbtr,
             END OF lt_openbal,
             BEGIN OF lt_log2,
                hkont TYPE hkont,
                opbal TYPE dmbtr,
                exp   TYPE dmbtr,
                cap   TYPE dmbtr,
                err   TYPE dmbtr,
             END OF lt_log2,
             BEGIN OF lt_zsct_record,
                kongr TYPE ckml_kongr,
                hkont TYPE hkont,
                zcptp TYPE zdecptp,
                zerrc TYPE zdeerrc,
             END OF lt_zsct_record.
      DATA: lw_zscs_record  TYPE t_zscs_record,
            lw_zsct_record       TYPE lt_zsct_record,
            li_zsct_record         TYPE STANDARD TABLE OF lt_zsct_record,
            li_zsct_record1       TYPE STANDARD TABLE OF lt_zsct_record,
            lw_log1                  TYPE t_zscs_record,
            li_log1                   TYPE STANDARD TABLE OF t_zscs_record,
            li_temp                  TYPE STANDARD TABLE OF t_zsct_autoinv,
            li_openbal              TYPE STANDARD TABLE OF lt_openbal,
            li_openbal_mod      TYPE STANDARD TABLE OF lt_openbal,
            li_log2                   TYPE STANDARD TABLE OF lt_log2,
            li_log2_t                TYPE STANDARD TABLE OF lt_log2,
            lw_log2                 TYPE lt_log2,
            lw_log2_t               TYPE lt_log2,
            lw_openbal_mod    TYPE lt_openbal,
            lw_openbal            TYPE lt_openbal.
      i_zscs_record1 = i_zscs_record.
      DELETE i_zscs_record1 WHERE zerrf NE space.
      SORT i_error_bapi BY recid.
      SORT i_error_bdc BY recid.
      SORT i_suc_bdc BY recid.
      SORT i_suc_bapi BY recid.
      SORT i_zscs_record1 BY recid.
      LOOP AT i_zscs_record1 INTO lw_zscs_record.
        lw_log1-recid = lw_zscs_record-recid.
        lw_log1-kongr = lw_zscs_record-kongr.
        lw_log1-hkont = lw_zscs_record-hkont.
        CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
          EXPORTING
            input  = lw_zscs_record-projk
          IMPORTING
            output = lw_log1-projk.
        lw_log1-werks = lw_zscs_record-werks.
        lw_log1-matnr = lw_zscs_record-matnr.
        lw_log1-zcptp = lw_zscs_record-zcptp.
        lw_log1-zerrf = lw_zscs_record-zerrf.
    To  Check if the KONGR value is is equal to 'E'
        IF lw_zscs_record-kongr = c_e.
          READ TABLE i_error_bapi INTO w_error_bapi WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrc = w_error_bapi-number.
            lw_log1-zertx = w_error_bapi-message.
          ENDIF.
        ELSE.
          READ TABLE i_error_bdc INTO w_error_bdc WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrc = w_error_bdc-number.
            lw_log1-zertx = w_error_bdc-message.
          ENDIF.
        ENDIF.
    *****To Check if the KONGR value is is equal to 'E'
        IF lw_zscs_record-kongr = c_e.
          READ TABLE i_suc_bapi INTO w_suc_bapi WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrf = c_x.
    *******To check if  lw_log1-zertx = w_error_bapi-message.
          ENDIF.
        ELSE.
          READ TABLE i_suc_bdc INTO w_suc_bdc WITH KEY recid = lw_zscs_record-recid BINARY SEARCH.
          IF sy-subrc = 0.
            lw_log1-zerrf = c_x.
    ********To check if lw_log1-zertx = w_error_bdc-message.
          ENDIF.
        ENDIF.
        APPEND lw_log1 TO li_log1.
    *To clear work areas
        CLEAR: lw_log1,
               w_error_bapi,
               w_suc_bdc,
               w_suc_bapi,
               w_error_bdc,
               lw_zscs_record.
      ENDLOOP.
      IF NOT i_zscs_record1 IS INITIAL.
    *To retrieve required data from the custom table ZSCT_AUTOINV
        SELECT saknr
               fipos
               geber
               saknr_off
               fipos_off
          FROM zsct_autoinv
          INTO TABLE i_autoinv
           FOR ALL ENTRIES IN i_zscs_record1
           WHERE saknr = i_zscs_record1-hkont.
        IF sy-subrc = 0.
          SORT i_autoinv.
        ENDIF.
      ENDIF.
    Assigning I_AUTOINV data into a local internal table for further processing
      li_temp[] = i_autoinv[ ].
    Sort LI_TEMP by SAKNR
      SORT li_temp BY saknr.
    Delete adjacent duplicates from LI_TEMP comparing SAKNR
      DELETE ADJACENT DUPLICATES FROM li_temp COMPARING saknr.
    Check if LI_TEMP is initial
      IF NOT li_temp[] IS INITIAL.
    Retrieve required data from table BSIS for all the G/L accounts
        SELECT  bukrs
                hkont
                augdt
                augbl
                zuonr
                gjahr
                belnr
                buzei
                shkzg
                dmbtr
           FROM bsis
           INTO TABLE li_openbal_mod
           FOR ALL ENTRIES IN li_temp
         WHERE  bukrs = c_wfp
           AND  hkont = li_temp-saknr.
        IF sy-subrc = 0.
        ENDIF.
      ENDIF.
      SORT li_openbal_mod BY hkont.
    ****Retrieve data from table ZSCT_RECORD for further processing for
    ****all entries where ZERRF is equal to space
      IF p_prsall = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
          FROM zsct_record                                  "#EC CI_NOFIRST
          INTO TABLE li_zsct_record
          WHERE zerrf = space.
        IF sy-subrc = 0.
    *****Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ELSEIF p_cstcpt = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
          FROM zsct_record                                  "#EC CI_NOFIRST
          INTO TABLE li_zsct_record
         WHERE zerrf = space
         AND   kongr NE c_e.
        IF sy-subrc = 0.
    ******Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ELSEIF p_cstexp = c_x.
        SELECT kongr
               hkont
               zcptp
               zerrc
         FROM  zsct_record                                  "#EC CI_NOFIRST
         INTO TABLE li_zsct_record
         WHERE zerrf = space
         AND   kongr EQ c_e.
        IF sy-subrc = 0.
    ******Delete records from LI_ZSCT_RECORD where HKONT value is equal to space
          DELETE li_zsct_record WHERE hkont EQ space.
        ENDIF.
      ENDIF.
      LOOP AT li_openbal_mod INTO lw_openbal.
        IF lw_openbal-shkzg = c_shkzg1.
          v_todmbtr = v_todmbtr + lw_openbal-dmbtr.
        ELSEIF lw_openbal-shkzg = c_shkzg2.
          v_todmbtr = v_todmbtr - lw_openbal-dmbtr.
        ENDIF.
        AT END OF hkont.
          lw_log2-hkont = lw_openbal-hkont.           "GL account
          lw_log2-opbal = ABS( v_todmbtr ).      "Open item balance
          APPEND lw_log2 TO li_log2.
    *log record appended with GL Account and account open item balance
          CLEAR: v_todmbtr,
                 lw_openbal.
        ENDAT .
      ENDLOOP.
      SORT li_log2 BY hkont.
      LOOP AT li_log2 INTO lw_log2.
        CLEAR v_totexppe.
        CLEAR v_totcapit.
        CLEAR v_toterror.
    *Cost portion to be capitalised calculated
        LOOP AT li_zsct_record INTO lw_zsct_record
                 WHERE hkont = lw_log2-hkont AND
                  kongr NE c_e AND zerrc IS INITIAL.
          v_totcapit = v_totcapit + lw_zsct_record-zcptp.  "CC calculated
        ENDLOOP.
    *Expensed cost portion calculated
        LOOP AT li_zsct_record INTO lw_zsct_record WHERE
                hkont = lw_log2-hkont        AND
                kongr = c_e AND zerrc IS INITIAL .
          v_totexppe = v_totexppe + lw_zsct_record-zcptp.  "ECP calculated
        ENDLOOP.
    *Errors calculated
        LOOP AT li_zsct_record INTO lw_zsct_record WHERE
                hkont = lw_log2-hkont AND
                zerrc IS NOT INITIAL .
          v_toterror = v_toterror + lw_zsct_record-zcptp.  "Errors calculated
        ENDLOOP.
        lw_log2-exp = v_totexppe.           "Expensed cost portion
        lw_log2-cap = v_totcapit.           "Cost capitalised
        lw_log2-err = v_toterror.           "Errors
    *Cost portion capitalised expensed and errors in calculation are
    *trans ported for related GL accont
        MODIFY li_log2 FROM lw_log2
        TRANSPORTING exp cap err.
      ENDLOOP.
      LOOP AT li_log2_t INTO lw_log2_t.
        MODIFY li_log2 FROM lw_log2_t TRANSPORTING opbal WHERE hkont = lw_log2_t-hkont.
        CLEAR : lw_log2_t.
      ENDLOOP.
      WRITE:/1(15) text-018,sy-datum.             "SESSION DATE:
      SKIP 2.
    For printing the hear level of the output log
      WRITE:/1(16)   text-003,                     "Record ID number
             20(11)  text-004,                     "Reason Code
             34(10)  text-005,                     "GL Account
             47(12)  text-006,                     "Project Code
             62(5)   text-007,                     "Plant
             70(9)   text-008,                     "Commodity
             82(25)  text-009,                     "Cost portion To be posted
             110(12) text-010,                     "Success Flag
             125(10) text-011,                     "Error Code
             138(50) text-012.                     "Error TXT
      SKIP.
      LOOP AT li_log1 INTO lw_log1.
        WRITE:/1(16)   lw_log1-recid,
               20(11)  lw_log1-kongr,
               34(10)  lw_log1-hkont,
               47(12)  lw_log1-projk,
               62(5)   lw_log1-werks,
               70(9)   lw_log1-matnr,
               82(25)  lw_log1-zcptp,                       "#EC UOM_IN_MES
               110(12) lw_log1-zerrf,
               125(10) lw_log1-zerrc,
               138(80) lw_log1-zertx.
        CLEAR:lw_log1.
      ENDLOOP.
      SKIP 2.
      IF NOT li_log2 IS INITIAL.
        ULINE.
        WRITE:/1(16)  text-013,                  "GL ACCOUNT CODE
               20(17) text-014,                  "OPEN ITEM BALANCE
               40(21) text-015,                  "EXPENSED COST PORTION
               64(24) text-016,                  "CAPITALIZED COST PORTION
               92(20) text-017.                  "ERRORS.
        LOOP AT li_log2 INTO lw_log2.
          WRITE:/1(16)   lw_log2-hkont,
                 20(17)  lw_log2-opbal,                
                 40(21)  lw_log2-exp,                      
                 64(24)  lw_log2-cap,                     
                 92(20)  lw_log2-err.                     
          CLEAR:lw_log2.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " DISPLAY_LOGFILE

    hi,
    You need to use FM 'REUSE_ALV_LIST_DISPLAY' for this purpose. For using this FM, you need to create a field catlog which will contain all information about the coloumns you want to display for example their position, their text etc.
    Below there is a small demo for achiving this.
    TYPE-POOLS:slis.
    DATA : i_fieldcat TYPE slis_t_fieldcat_alv.
    TYPES: BEGIN OF ty_itab1,
           vbeln LIKE vbap-vbeln,
           posnr LIKE vbap-posnr,
           werks LIKE vbap-werks,
           lgort LIKE vbap-lgort,
           END OF ty_itab1.
    DATA: itab1 TYPE TABLE OF ty_itab1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.
    SELECTION-SCREEN END OF  BLOCK b1.
    START-OF-SELECTION.
      PERFORM select_data.
    END-OF-SELECTION.
    PERFORM display.
    FORM select_data .
      SELECT vbeln
         posnr
         werks
         lgort
         INTO CORRESPONDING  FIELDS OF TABLE itab1
         FROM vbap
         WHERE  vbeln IN s_vbeln.
      IF sy-subrc <> 0.
        MESSAGE 'Enter The Valid Sales Document Number'(t04) TYPE 'I'.
        EXIT.
      ENDIF.
    ENDFORM.
      IF alv_list = 'X'.
        PERFORM build_fieldcat TABLES i_fieldcat[]
                               USING :
    *-Output-field Table      Len  Ref fld Ref tab Heading    Col_pos
       'VBELN'       'ITAB1'     10   'VBAP'  'VBELN'    ''            1,
       'POSNR'       'ITAB1'     6    'VBAP'  'POSNR'    ''            2,
       'WERKS'       'ITAB1'     4    'VBAP'  'WERKS'    ''            3,
       'LGORT'       'ITAB1'     4    'VBAP'  'LGORT'    ''            4.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = sy-repid
           i_callback_pf_status_set = c_pf_status
            i_callback_user_command  = 'USER_COMMAND '
           it_events                = t_alv_events[]
            it_fieldcat              = i_fieldcat[]
          TABLES
            t_outtab                 = itab1[]
          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.
      ENDIF.
    FORM build_fieldcat TABLES  fpt_fieldcat TYPE slis_t_fieldcat_alv
                        USING   fp_field     TYPE slis_fieldname
                                fp_table     TYPE slis_tabname
                                fp_length    TYPE dd03p-outputlen
                                fp_ref_tab   TYPE dd03p-tabname
                                fp_ref_fld   TYPE dd03p-fieldname
                                fp_seltext   TYPE dd03p-scrtext_l
                                fp_col_pos   TYPE sy-cucol.
    *-- Local data declaration
      DATA:   wl_fieldcat TYPE slis_fieldcat_alv.
    *-- Clear WorkArea
      wl_fieldcat-fieldname       = fp_field.
      wl_fieldcat-tabname         = fp_table.
      wl_fieldcat-outputlen       = fp_length.
      wl_fieldcat-ref_tabname     = fp_ref_tab.
      wl_fieldcat-ref_fieldname   = fp_ref_fld.
      wl_fieldcat-seltext_l       = fp_seltext.
      wl_fieldcat-col_pos         = fp_col_pos.
    *-- Update Field Catalog Table
      APPEND wl_fieldcat  TO  fpt_fieldcat.
    ENDFORM.

  • Double click on output in write statement

    hi,
    i have a list of PO as outout thru write statement(classical).i wamt to open me23n with the double click on that particular po.
    how could i do this? answer with full code.

    Hello
    After capture the number of the PO do the following
                SET PARAMETER ID 'BES' FIELD <n° of the PO>
                CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    Hope it helps
    Kleber Santos

  • Clearing write statements

    We are facing a problem with clearing the write statement buffer.
    Our aim is to send mail by compressing the list memory, and the mail is sent in a loop. In each loop we have different set of data to be sent. But problem here is in the mails after the first mail, the data is getting appended in the subsequent mails.
    For example,
    do 10 times.
    *****Have to clear buffer here*****
    write :/ hi.
    perform sendmail.
    enddo.
    The above code should give ten emails...with only "hi". In other words, the list output should be only one "hi" and not 10 times hi. WE have tried all possibilites to clear the write buffer, Any help in this regard is highly appreciated.

    Hi aakash,
    1. use MODIFY LINE concept,
       to modify the line number 1
       (so that line 1 is RE-WRITTEN there itself,
        instead of line 2, 3, 4,..etc)
    2. just copy paste
    3. It will give only 1 HI, in 10 loops.
    4.
    report abc.
    DATA : MSG(100) TYPE C.
    MSG = 'HI'.
    DO 10 TIMES.
      IF SY-INDEX = 1.
        WRITE :/ MSG.
      ELSE.
        MODIFY LINE 1 LINE VALUE  FROM MSG.
      ENDIF.
    ENDDO.
    regards,
    amit m.

  • Triggering a Top-of- Page without a WRITE statement

    TOP-OF-PAGE event is fired only when it encounters the first Write statement in the report.
    Q)Is there any way to trigger this event,without having a write statement in the program??
    A)The answer is yes.If you write a SKIP statement in the SELECTION-SCREEN,then your TOP-OF-PAGE event would fire.

    hi Phani,
      Top-of-page gets triggered if we write something on output screen.
    Though we write SKIP in selection-screen, 2 lines gets skipped after printing the statement "top of page triggered" in the example below. After 2 lines "start of selection triggered" gets printed.
    report ztest no standard page heading.                                                                               
    selection-screen begin of block b1 with frame title text-001.      
    parameters : p_para type c.                                       
    skip 2.                                                           
    selection-screen end of block b1.                                                                               
    start-of-selection.                                                
    write :/ 'in start of selection'.                                                                               
    top-of page.                                                       
    write :/ 'top of page triggered'.

  • Question about 'write' statement

    Hi,
    A question on write statement.
    I have a internal table itab which has field var. I am looping at this itab and writing horizontal heading output like below.
    example on the output heading:
    (3 spaces) itab-var (20 spaces) itab-var (20 spaces) itab-var.
    the coding is:
    loop at itab.
    write: 3 itab-var.
    endloop.
    I want to increase the space by 20 for every loop. How to increase this 3 by 20? Can we accomplish this way?
    Thank you for your time.

    hi krishen,
    just add 20 inside the loop , so that after every loop its value increases by 20
    for example:
    data: v  type i.
    v=3.
    do 3 times.
    write: at v(20).
    v=v+20.
    end do.
    hope it will help you
    regards
    Rahul sharma
    Edited by: RAHUL SHARMA on Sep 4, 2008 7:47 AM

  • How to move "write statements" to a internal table...

    hi experts.
    i did "write statement" as follows
    |  a  |  b  |  c  |  d  |
    and then i want to insert to internal table after the screen contents as above.
    the internal table exist only one field as follows.
    data: begin of gt_itab,
              line     type  char255,
            end    of gt_itab.
    can i do this one?
    i wish your answer.
    thanks.
    Regards
    FM.
    Edited by: yuntae kim on Jun 4, 2009 3:07 PM

    Hi, you can try to export the list to memory. Like the code below:
    DATA: tg_str TYPE TABLE OF listzeile,
              tl_mem TYPE TABLE OF abaplist,
              ilist TYPE TABLE OF abaplist WITH HEADER LINE.
    EXPORT LIST TO MEMORY
    CALL FUNCTION 'LIST_TO_MEMORY'
       EXPORTING
         list_index = 0
       TABLES
         listobject = ilist
       EXCEPTIONS
         empty_list = 1.
    READ THE LIST
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = tl_mem
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
        EXIT.
      ENDIF.
    CHANGE LIST TO ASCII
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          listasci            = tg_str
          listobject         = tl_mem
        EXCEPTIONS
          empty_list           = 1
          list_index_invalid  = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
        EXIT.
      ENDIF.
    On table tg_str you gonna have the:
    a
    b
    c
    d
    I hope it helps.

  • Dynamic write statements

    HI Experts,
    Can anybody tell  me following answers.
    I have
    select-options: p_date like Ztab1-date. (we can choose here till 15dates)
                                          low =01/07/07 to high-15/07/07
    output screen.
    <b>items   date1 date2 date3 date4 date5  date6 date7 date8 date9 ..date15 TotalQty</b>
    <b>cat1</b>     1000   500  -
        700                                                  700      2900
    <b>cate2</b>    so on
    <b>cate3</b>
    In write statement: i want my program to decide total qty column should write just select-options range. like if i given in select options 17/07/07 to 18/07/07. my total column should come after next to 2columns, when i given 7 days its shud just next to 7th column,when i given 01st jul 07 to 15th july 07, total come just next to 15th column.
    How to do that? Pls sugest.
    Thanks in advance.

    You can use field-symbols:
    field-symbols: <fvalue>.
    Loop at itab.
    New-line.
        DO .
          ASSIGN COMPONENT sy-index OF STRUCTURE itab TO <fvalue> .
          IF sy-subrc NE 0 .
            EXIT .
          ENDIF .
          write <fvalue>.
        ENDDO.
    Endloop.
    You will have to add the headings first and the row labels if needed.
    Please reward points if helpful.
    Minami

  • Statement after endform doesnt work

    why the write statement doesnot work after endform statement.
    ENDFORM.
    write:/ 'syed'.
    Moderator message: please read ABAP documentation.
    Edited by: Thomas Zloch on Dec 7, 2010 11:48 AM

    Hi,
    Check the following link:
    http://help.sap.com/saphelp_wp/helpdata/en/9f/db986035c111d1829f0000e829fbfe/content.htm
    Regards,
    Bhaskar

  • Going to a transaction from a write statement

    Hi,
    I have a simple write statement which gives a PO number and a description about it. When i click on the PO number, it should directly go to transaction ME22N. Please note that i know how to implement the same requirement from the output ALV grid. But now iam not knowing how to go to the transaction from a output write statement. Please suggest what can be done ?

    Hi ..
    Check this..
    AT LINE-SELECTION.
    READ LINE sy-lilli FIELD VALUE itab-po_num.   "PO field
    IF itab-po_num NE SPACE.
    CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT'
        EXPORTING
          i_ebeln              = itab-po_num
          i_enjoy              = 'X'
          i_edit               = 'X'
    *      i_etenr              =
        EXCEPTIONS
          not_found            = 1
          no_authority         = 2
          invalid_call         = 3
          preview_not_possible = 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.
    ENDIF.
    "PS: with enjoy transaction like ME22n it works perfect
    Message was edited by:
            Perez C

  • Avoid Write statement in a Submit.

    Hi Experts,
    I am writing a report say R1 which has a submit statement to report R2, later R2 submits to R3.
    Now there is a write statement in R3. So output of R3 is being displayed.
    my problem is that I can make changes only in R1, due to my client standards.
    Is there any way to skip this R3 output and show it as output for the R1?
    I tried SUBMIT AS JOB, but we cannot use WITH LIST MEMORY with it.
    PS : I want to catch output of R3 and show it as output for R1. And the requirement should be achieved without use of back button.
    Thanks,
    Anil

    Hi Frederic,
    SUBMIT .... AND RETURN EXPORTING LIST TO MEMORY.  Still displays the output of 3rd report. then I need to click back button to come back to the Report1.
    I actually need to add few more changes in Report1 after this submit statement. And then dispaly the Write statements of third report.
    Thanks,
    Anil

Maybe you are looking for

  • How to program for multiple tasks at the same time.

    I want to start a data acq, then detect a level change in a switch which also corresponds to a visible timer starting. The timer will stop when one of three switches is closed. In the middle of this I would like for there to be a selectable (controll

  • Alert with EventId 33333 and Source DataAccessLayer

    Hello! I have developed an Outbound connector. In occasions that are not still clear to me, this error exits in the Operations Manager log of my RMS (root mgmt server): EventId: 33333 Source: DataAccessLayer Description: Data Access Layer rejected re

  • Exception While Developing FPM application.

    Hi All, We are on EP7.0/ECC6.0. I'm trying to develop a new ESS webdynpro application using FPM. I'm using the steps as given <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/43/3b709efa6c1bcbe10000000a1553f7/frameset.htm">here</a> The applic

  • SAP MDM-BOBJ Integration

    Hi Folks, has anybody used SAP BOBJ in his/her MDM Project. I need to know the capabilities and the technical architecture of BOBJ with MDM.I understand that the data cleansing in BOBJ is done in regard to international standard formatting for addres

  • MSATA or 2.5" SSD for Lenovo Thinkpad s230u Twist?

    The Subject sort of explains itself, however I will add some more infromation for convenience sake: Generally speaking I think of myself as fairly knowlageble about computers and their hardware. When it comes to laptops however I'm not so knowlagable