Uline vs Box in sapscritp

Dear all,
I would like to implement a box within the main window of my sapscript in order to have horizontal line covering the
/: height 0 tw frame 10 tw
/e item header
blablabla
/: height 0 tw frame 10 tw
The first line works fine but not the second one. Why?
Regards.
Nozome.

Hi,
For horizontal line we need to take care of YPOS...
Check it once.
***************look some examples.
/:   BOX YPOS '0.0' CM WIDTH '25.4' CM HEIGHT '0.85' CM FRAME 4 TW
/:   BOX YPOS '0' CM XPOS '4.4'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
/:   BOX YPOS '0' CM XPOS '8.35'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
/:   BOX YPOS '0' CM XPOS '11.6'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
/:   BOX YPOS '0' CM XPOS '19.65'CM WIDTH '0'CM HEIGHT '0.85'CM FRAME 4 TW
B     <K>CUSTOMER NO.</>            <K> CONTRACT NO. / SALES ORDER NO.</>
=     <K>  ORIGINAL INVOICE NO.</>  ,,<K>  CUSTOMER PO.</>
=                               ,,,,<K>TERMS</>
/:   BOX YPOS '3.25'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
/:   BOX YPOS '5.1'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
/:   BOX YPOS '6.95'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
/:   BOX YPOS '8.85'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
/:   BOX YPOS '10.6'CM WIDTH '25.4'CM HEIGHT '0.95'CM FRAME 0 TW INTENSITY 8
Thanks.
Please close the thread if your issue is solved.
Message was edited by: Deepak333 k
Message was edited by: Deepak333 k

Similar Messages

  • Clearing Check box

    Hi,
    I have to create the credit memo based on user selected records. My program is doing it, but I am having two problems,
    1)After creating the credit memo it is not clearing those records, if I choose next set it is adding 2nd time selected records to the first time selected records and adding to previous credit memo number.
    2)If the credit memo number is already there to a record, it should not allow the same record to create another CM.
    Please help me to solve these.
    Thanks,
    Neelu.
    REPORT zsd_creditmemo  NO STANDARD PAGE HEADING.
    TABLES: zppprice, kna1.
    TYPES: BEGIN OF ty_zprice,
              mandt  TYPE mandt,
              vkorg  TYPE vkorg,
              vtweg  TYPE vtweg,
              spart  TYPE spart,
              kunnr  TYPE kunnr,
              matnr  TYPE matnr,
              crdate TYPE zcrdate,
              efdate TYPE zefdate,
              sprice TYPE zprice3,
              eprice TYPE zprice4,
              eohqty TYPE zquantity1,
              aohqty TYPE zquantity2,
              auart  TYPE auart,
              bstkd  TYPE bstkd,
              werks  TYPE werks_d,
              augru  TYPE augru,
              xblnr  TYPE xblnr,
              crmemo TYPE vbeln,
              index  TYPE sy-index,
         END OF ty_zprice.
    DATA: it_ztable TYPE TABLE OF zppprice WITH HEADER LINE,
          gt_zprice TYPE TABLE OF zppprice  WITH HEADER LINE,
          gt1_zprice TYPE TABLE OF zppprice,
          gt2_zprice TYPE TABLE OF ty_zprice,
          gt3_zprice TYPE TABLE OF ty_zprice,
          gt4_zprice TYPE TABLE OF ty_zprice,
          gs_zprice TYPE zppprice,
          gs_zprice1 TYPE ty_zprice,
          ls_zprice TYPE ty_zprice,
          wa LIKE zppprice.
    DATA: salesdocument      TYPE bapivbeln-vbeln.
    DATA: header             LIKE bapisdhd1.
    DATA: headerx            LIKE bapisdhd1x.
    DATA: item               LIKE bapisditm  OCCURS 0 WITH HEADER LINE.
    DATA: itemx              LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
    DATA: partner            LIKE bapiparnr  OCCURS 0 WITH HEADER LINE.
    DATA: return1            LIKE bapiret2    OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                                  WITH HEADER LINE.
    DATA: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                                  WITH HEADER LINE.
    DATA: conditions1        LIKE bapicond OCCURS 0 WITH HEADER LINE.
    DATA: order_text         LIKE bapisdtext OCCURS 0 WITH HEADER LINE.
    DATA: lv_index TYPE sy-index,
          v_tabix TYPE sytabix,
          chbox(1)  TYPE c VALUE ' ',
          repid     TYPE sy-repid,
          lv_itemno TYPE i VALUE 10,
          lv_pprice TYPE zprice3,
          lv_lines  TYPE i,
          lv_flg     TYPE c,
          lv_cnt TYPE i.
    repid = sy-repid.
    PERFORM displaydata.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'CMEMO'.
          DESCRIBE TABLE gt_zprice LINES lv_cnt.
    *      lv_index = 1.
          DO lv_cnt TIMES.
            lv_index = sy-index + 1.
            READ LINE lv_index FIELD VALUE chbox.
            IF chbox = 'X'.
              READ TABLE gt_zprice INTO gs_zprice1 INDEX sy-index.
              IF sy-subrc EQ 0.
                gs_zprice1-index = sy-index.
                APPEND gs_zprice1 TO gt2_zprice.
                CLEAR gs_zprice1.
              ENDIF.
    *          ELSE.
    *          WRITE: /01(253) 'Please Select At least One Record'.
            ENDIF.
            clear chbox.
          ENDDO.
          gt4_zprice[] = gt2_zprice[].
          SORT gt2_zprice BY vkorg vtweg spart kunnr.
          DELETE ADJACENT DUPLICATES FROM gt2_zprice
                          COMPARING vkorg vtweg spart kunnr.
          DESCRIBE TABLE gt2_zprice LINES lv_lines.
          IF lv_lines = 1.
            LOOP AT gt4_zprice INTO gs_zprice1.
              AT NEW kunnr.
                MOVE 'Y' TO lv_flg.
              ENDAT.
              IF lv_flg EQ 'Y'.
                PERFORM headerdata.
                PERFORM texts.
                CLEAR lv_flg.
              ENDIF.
              PERFORM itemdata.
              APPEND gs_zprice1 TO gt3_zprice.
            ENDLOOP.
            PERFORM call_function.
            PERFORM update_pricetable.
            PERFORM errorcheckandcommit.
            PERFORM displaydata.
    *   WRITE: /01(253) 'Please Select Again To Create Another Credit Memo'.
            REFRESH gt2_zprice.
            CLEAR chbox.
            CLEAR lv_lines.
          ELSE.
    *          WRITE: /01(253) 'Please Select Same Customer'.
            REFRESH gt2_zprice.
            CLEAR chbox.
            EXIT.
          ENDIF.
      ENDCASE.
    *&      Form  headerdata
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM headerdata.
    * header data
    * Sales document type
      header-doc_type = gs_zprice1-auart.
      headerx-doc_type = 'X'.
    * Sales organization
      header-sales_org = gs_zprice1-vkorg.
      headerx-sales_org = 'X'.
    * Distribution channel
      header-distr_chan  = gs_zprice1-vtweg.
      headerx-distr_chan = 'X'.
    * Division
      header-division = gs_zprice1-spart.
      headerx-division = 'X'.
    * Customer PO Number
      header-purch_no_c = gs_zprice1-bstkd.
      headerx-purch_no_c = 'X'.
    * Order Reason
      header-ord_reason = gs_zprice1-augru.
      headerx-ord_reason = 'X'.
    * Ref Doc Number
      header-ref_doc_l = gs_zprice1-xblnr.
      headerx-ref_doc_l = 'X'.
      headerx-updateflag = 'I'.
    ENDFORM.                    " headerdata
    *&      Form  Texts
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM texts.
    *Texts
      order_text-itm_number  = '000000'.
      order_text-text_id = '0001'.
      order_text-langu = sy-langu.
      order_text-text_line = gs_zprice1-xblnr.
      APPEND order_text.
    ENDFORM.                    " Texts
    *&      Form  itemdata
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM itemdata.
    * Partner data
    * Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = gs_zprice1-kunnr.
      APPEND partner.
    * ITEM DATA
      itemx-updateflag = 'I'.
    * Line item number.
      item-itm_number = lv_itemno.
      itemx-itm_number = 'X'.
    * Material
      item-material = gs_zprice1-matnr.
      itemx-material = 'X'.
    * Plant
      item-plant    = gs_zprice1-werks.
      itemx-plant   = 'X'.
    * Quantity
      item-target_qty = gs_zprice1-eohqty.
      itemx-target_qty = 'X'.
      APPEND item.
      APPEND itemx.
    *Fill schedule lines
      lt_schedules_in-itm_number = lv_itemno.
      lt_schedules_in-sched_line = '0001'.
      lt_schedules_in-req_qty    = gs_zprice1-eohqty.
      APPEND lt_schedules_in.
    *Fill schedule line flags
      lt_schedules_inx-itm_number  = lv_itemno.
      lt_schedules_inx-sched_line  = '0001'.
      lt_schedules_inx-updateflag  = 'I'.
      lt_schedules_inx-req_qty     = 'X'.
      APPEND lt_schedules_inx.
    *Conditions
      lv_pprice = gs_zprice1-sprice - gs_zprice1-eprice.
      conditions1-itm_number  = lv_itemno.
      conditions1-cond_type   = 'ZCPP'.
      conditions1-cond_value  = lv_pprice.
      conditions1-currency    = 'USD'.
      conditions1-cond_unit   = 'EA'.
      conditions1-cond_p_unt = 1.
      APPEND conditions1.
      lv_itemno = lv_itemno + 10.
    ENDFORM.                    " itemdata
    *&      Form  call_function
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM call_function.
      CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
           EXPORTING
                sales_header_in     = header
                sales_header_inx    = headerx
           IMPORTING
                salesdocument_ex    = salesdocument
           TABLES
                return              = return1
                sales_items_in      = item
                sales_items_inx     = itemx
                sales_partners      = partner
                sales_schedules_in  = lt_schedules_in
                sales_schedules_inx = lt_schedules_inx
                sales_conditions_in = conditions1
                sales_text          = order_text.
    ENDFORM.                    " call_function
    *&      Form  errorcheck
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM errorcheckandcommit.
    * Check the return table.
      LOOP AT return1 WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      break singireddyn.
      IF sy-subrc = 0.
        WRITE: / 'Error in creating document'.
      ELSE.
    *Commit the work.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
                  wait = 'X'.
      ENDIF.
    ENDFORM.                    " errorcheckandcommit
    *&      Form  update_pricetable
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM update_pricetable.
      LOOP AT gt3_zprice INTO ls_zprice.
        READ TABLE gt_zprice INTO gs_zprice INDEX ls_zprice-index.
        IF sy-subrc EQ 0.
          v_tabix = sy-tabix.
          gs_zprice-crmemo = salesdocument.
          MODIFY gt_zprice
          FROM gs_zprice INDEX v_tabix TRANSPORTING crmemo.
        ENDIF.
      ENDLOOP.
    *  REFRESH:gt3_zprice.
      LOOP AT gt_zprice.
        wa-vkorg = gt_zprice-vkorg.
        wa-vtweg = gt_zprice-vtweg.
        wa-spart = gt_zprice-spart.
        wa-kunnr = gt_zprice-kunnr.
        wa-matnr = gt_zprice-matnr.
        wa-crdate = gt_zprice-crdate.
        wa-efdate = gt_zprice-efdate.
        wa-sprice = gt_zprice-sprice.
        wa-eprice = gt_zprice-eprice.
        wa-eohqty = gt_zprice-eohqty.
        wa-aohqty = gt_zprice-aohqty.
        wa-auart = gt_zprice-auart.
        wa-bstkd = gt_zprice-bstkd.
        wa-werks = gt_zprice-werks.
        wa-augru = gt_zprice-augru.
        wa-xblnr = gt_zprice-xblnr.
        wa-crmemo = gt_zprice-crmemo.
        MODIFY zppprice FROM wa.
        CLEAR: wa, zppprice.
      ENDLOOP.
    ENDFORM.
    *&      Form  Displaydata
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM displaydata.
      SET PF-STATUS 'LIST'.
      NEW-PAGE LINE-SIZE 253.
      SELECT * FROM zppprice
               INTO TABLE gt_zprice.
      WRITE: /01(253) sy-uline.
      LOOP AT gt_zprice INTO gs_zprice.
        SELECT SINGLE name1 FROM kna1 INTO kna1-name1
                       WHERE kunnr = gs_zprice-kunnr.
        WRITE: /01 sy-vline,
                02 chbox AS CHECKBOX,
                04 sy-vline,
                05 gs_zprice-vkorg,
                10 sy-vline,
                11 gs_zprice-vtweg,
                14 sy-vline,
                15 gs_zprice-spart,
                18 sy-vline,
                19 gs_zprice-kunnr,
                30 sy-vline,
                31 kna1-name1,
                67 sy-vline,
                68 gs_zprice-matnr,
                87 sy-vline,
                88 gs_zprice-crdate,
                98 sy-vline,
                99 gs_zprice-efdate,
                110 sy-vline,
                111 gs_zprice-sprice,
                127 sy-vline,
                128 gs_zprice-eprice,
                145 sy-vline,
                146 gs_zprice-eohqty,
                157 sy-vline,
                158 gs_zprice-aohqty,
                169 sy-vline,
                170 gs_zprice-auart,
                175 sy-vline,
                176 gs_zprice-bstkd,
                212 sy-vline,
                213 gs_zprice-werks,
                218 sy-vline,
                219 gs_zprice-augru,
                223 sy-vline,
                224 gs_zprice-xblnr,
                241 sy-vline,
                242 gs_zprice-crmemo,
                253 sy-vline.
    *    CLEAR zppprice.
      ENDLOOP.
      WRITE: /01(253) sy-uline.
    *  CLEAR zppprice.
    *  CLEAR chbox.
    ENDFORM.                    " Displaydata

    Hello Neelu,
    once user select check box and it will create credit memo,so selected records it contains one value would be 'X'.,
    After BAPI FM use delete command where field = 'X'. so it will delete those records. so now you have remaining records.
    do not use exit or someother command,here you are just deleting the internal table data  and so no worries.
    <b>it any of the selected records have CM number can I come out of the loop and exit.</b>
    look at real time requirement ,some time user will select one check box and create credit memo ,again he will select other check boxes too. so use simple delete command.
    Thanks
    Seshu

  • What is the difference between sy-uline and uline in sapscripts ?

    hi guys,
    what is the difference bt sy-uline and uline in sap scripts ?
    this is an interview question ?
    also how can we draw a line without using above ?

    Hi ,
    sy-uline is a system field.
    No-difference.  Except that uline is used outside
    the Write Statement
    TO draw a line.
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    OR
    Draw a horizontal line by setting the HEIGHT in a BOX command to 0. Draw a vertical line by setting WIDTH to 0.
    /: BOX FRAME 10 TW WIDTH 0 TW HEIGHT '10' CM
    Vertical line 10 CM long
    /: BOX FRAME 10 TW WIDTH '10' CM HEIGHT 0 TW
    Horizontal line 10 CM long
    ALSO
    You can draw a line by setting the Height or Weidth to 0
    and add a frame. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
    <i><b>Reward if helpful.</b></i>
    Regards,
    Pritha.
    Message was edited by:
            Pritha Agrawal

  • How to select the output list check boxes

    Hi ABAP gurus,
       I am developing the on report, it display the output list, in that output list first column is Check box,
    here i created the 3 Pushbuttons on application tool bar,  one pushbutton is SELECT ALL, 2nd one is DESELECT ALL , 3rd one is CREDIT NOT CREATE,
    here when i click on the Select all button it will select all the check boxs and click on the credit not button  it will create credit memos for all the customers,  if i select the one or more than one check boxs, it will not working means (Credit note will not be created for that paricular customer)
    plz tell me answer, if u know the any example programs related to this program plz send me.

    Hi,
    refer this sample code.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'F2'.
          PERFORM selection.
        WHEN 'SELECTALL'.
          PERFORM selectall.
        WHEN 'DESELECTAL'.
          PERFORM deselectall.
      ENDCASE.                             " CASE SY-UCOMM
    *&      Form  selection                                                *
          Selecting records of basic list and display flight information *
          No parameters transferred                                      *
    FORM selection .
      DO w_lines TIMES.
        READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox
                                    fs_spfli-carrid INTO fs_spfli-carrid
                                    fs_spfli-connid INTO fs_spfli-connid
                                    w_mark INTO w_mark.
        IF sy-subrc EQ 0.
          IF w_checkbox EQ 'X' AND w_mark NE '*'.
            w_mark = '*'.
            MODIFY CURRENT LINE FIELD VALUE w_mark
                                FIELD FORMAT w_checkbox INPUT OFF.
            SELECT carrid                  " Airline Code
                   connid                  " Flight Connection Number
                   fldate                  " Flight date
                   seatsmax                " Maximum capacity
                   seatsocc                " Occupied seats
              FROM sflight
              INTO CORRESPONDING FIELDS OF TABLE t_sflight
              WHERE carrid EQ fs_spfli-carrid AND connid EQ fs_spfli-connid.
            IF sy-subrc EQ 0.
              LOOP AT t_sflight INTO fs_sflight.
                WRITE :/2 fs_sflight-carrid,
                       10 fs_sflight-fldate,
                       25 fs_sflight-seatsmax,
                       45 fs_sflight-seatsocc.
              ENDLOOP.                     " LOOP AT T_SFLIGHT INTO....
              ULINE.
              CLEAR t_sflight.
            ELSE.
              MESSAGE text-001 TYPE 'S'.
            ENDIF.                         " IF SY-SUBRC EQ 0
          ENDIF.                           " IF W_CHECKBOX EQ 'X' AND .....
        ENDIF.                             " IF SY-SUBRC EQ 0
        ADD 1 TO w_lineno.
        CLEAR w_checkbox.
      ENDDO.                               " DO W_LINES TIMES
      w_lineno = 3.
    ENDFORM.                               " Selection

  • How to have dotted box in Smartform

    I wish to create a dotted box something like
         |_ _ _ _ _|    this in Smartform Any ideas how to go about
    Message was edited by:
            gagan kasana

    hi gagan,
    u can create a dotted line...since u had used a template...
    in text before displaying that text use the code SY-uline for horizontal line
    SY-VLINE for vertical line...
    this will give u a dotted line...
    hope this will help u out,
    please reward points in case usefull
    regards,
    Prashant

  • Capturing check box value into internal table

    Hi all,
    I am displaying the output including check box through following internal table.
    The checkbox is displayed before every record.
      <b>LOOP AT it_qals.
        WRITE:/  it_qals-t_val  AS CHECKBOX,
               5 it_qals-werk,
              12 it_qals-prueflos,
              30 it_qals-matnr,
              50 it_qals-charg,
              62 it_qals-lagortchrg.
        hide: it_qals .
      ENDLOOP.</b>
    I selected some of the records through check the checkboxes. when i click the <b>PUSHBUTTON TRANSFER</b>, those selected records only should transfer. i don't know how to modify the internal table with latest checkbox values. Initially checkbox values are blank.
    Is there any solution except Function Module.
    i would appreciate an earlier reply.
    Regards
    Prabhu

    Hello,
    Create one more table and transfer your entries into new table.
    I have attached my code for you.
    Regards,
    Naimesh
    REPORT ZTEST_NP NO STANDARD PAGE HEADING.
    TABLES: MARA, MAKT.
    DATA: BEGIN OF IT_MARA OCCURS 0,
          MATNR LIKE MARA-MATNR,
          MAKTX LIKE MAKT-MAKTX,
          SEL,
          END   OF IT_MARA.
    DATA: IT_MARA1 LIKE IT_MARA OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
      SET PF-STATUS 'ZTEST'.
      PERFORM GET_DATA.
      PERFORM WRITE_DATA.
    TOP-OF-PAGE.
      PERFORM HEADER.
    AT USER-COMMAND.
      CASE SY-UCOMM.
      WHEN 'SELECT'.
        PERFORM GET_DATA_SELECTED.
        PERFORM WRITE_DATA_SELE.
      WHEN 'SELALL'.
        PERFORM SELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      WHEN 'DESEL'.
        PERFORM DESELECT_ALL.
        SY-LSIND = 0.
        PERFORM HEADER.
        PERFORM WRITE_DATA.
      ENDCASE.
    *&      Form  GET_DATA
    FORM GET_DATA.
      SELECT MATNR
             INTO TABLE IT_MARA
             FROM MARA
             WHERE MATNR LIKE 'IN10020%'.
      LOOP AT IT_MARA.
        SELECT SINGLE MAKTX
               INTO   IT_MARA-MAKTX
               FROM   MAKT
               WHERE  MATNR = IT_MARA-MATNR
               AND    SPRAS = SY-LANGU.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " GET_DATA
    *&      Form  WRITE_DATA
    FORM WRITE_DATA.
      ULINE /(50).
      LOOP AT IT_MARA.
        WRITE: / '|' NO-GAP,   IT_MARA-SEL AS CHECKBOX NO-GAP,
                 '|' NO-GAP, (10) IT_MARA-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA
    *&      Form  HEADER
    FORM HEADER.
      ULINE /(50).
      WRITE: / '|' NO-GAP, (1) ' ' NO-GAP,
               '|' NO-GAP, (10) 'Material'    NO-GAP,
               '|' NO-GAP, (35) 'Description' NO-GAP,
               '|' NO-GAP.
    ENDFORM.                    " HEADER
    *&      Form  GET_DATA_SELECTED
    FORM GET_DATA_SELECTED.
      DATA:  L_CNT TYPE I.
      DO.
        L_CNT = L_CNT + 1.
        READ LINE L_CNT FIELD VALUE IT_MARA-MATNR INTO IT_MARA1-MATNR
                                    IT_MARA-MAKTX INTO IT_MARA1-MAKTX
                                    IT_MARA-SEL   INTO IT_MARA1-SEL.
        IF SY-SUBRC = 0.
          IF IT_MARA1-SEL = 'X'.
            APPEND IT_MARA1.
            CLEAR  IT_MARA1.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_DATA_SELECTED
    *&      Form  WRITE_DATA_SELE
    FORM WRITE_DATA_SELE.
      PERFORM HEADER.
      ULINE /(50).
      LOOP AT IT_MARA1.
        WRITE: / '|' NO-GAP,   IT_MARA1-SEL AS CHECKBOX,
                 '|' NO-GAP, (10) IT_MARA1-MATNR NO-GAP,
                 '|' NO-GAP, (35) IT_MARA1-MAKTX NO-GAP,
                 '|' NO-GAP.
      ENDLOOP.
      ULINE /(50).
    ENDFORM.                    " WRITE_DATA_SELE
    *&      Form  SELECT_ALL
    FORM SELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = 'X'.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " SELECT_ALL
    *&      Form  DESELECT_ALL
    FORM DESELECT_ALL.
      LOOP AT IT_MARA.
        IT_MARA-SEL = ' '.
        MODIFY IT_MARA.
        CLEAR  IT_MARA.
      ENDLOOP.
    ENDFORM.                    " DESELECT_ALL

  • How can I disable a check box in one screen?

    Hi,
    I need to disable a check box in the screen 1106 on the program of the transaction F110. I can do that with a user exit or what I can use to do that?
    Thanks!

    you have two options :
    user exit  , check if there is one for this transction
    i attach program below .
    field exit  :
    Within the CMOD transaction type PRFB in the transaction window.
    PRFB is the ok-code to bring up the field exits.
    You can also use Program RSMODPRF to create field exits.
    hope its help u .
    program for user exut  :
    *& Report  ZUSEREXIT                                                   *
    report zuserexit no standard page heading .
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
      select single * from tadir where pgmid = 'R3TR'
                                   and object = 'PROG'
                                   and obj_name = tstc-pgmna.
      move : tadir-devclass to v_devclass.
      if sy-subrc ne 0.
        select single * from trdir where name = tstc-pgmna.
        if trdir-subc eq 'F'.
          select single * from tfdir where pname = tstc-pgmna.
          select single * from enlfdir where funcname =
                                              tfdir-funcname.
          select single * from tadir where pgmid = 'R3TR'
                                    and object = 'FUGR'
                                    and obj_name eq enlfdir-area.
          move : tadir-devclass to v_devclass.
        endif.
      endif.
      select * from tadir into table jtab where pgmid = 'R3TR'
                            and object = 'SMOD'
                            and devclass = v_devclass.
      select single * from tstct where sprsl eq sy-langu and
                                       tcode eq p_tcode.
      format color col_positive intensified off.
      write:/(19) 'Transaction Code - ',
           20(20) p_tcode,
           45(50) tstct-ttext.
      skip.
      if not jtab[] is initial.
        write:/(95) sy-uline.
        format color col_heading intensified on.
        write:/1 sy-vline,
               2 'Exit Name',
              21 sy-vline ,
              22 'Description',
              95 sy-vline.
        write:/(95) sy-uline.
        loop at jtab.
          select single * from modsapt where sprsl = sy-langu and
                                             name = jtab-obj_name.
          format color col_normal intensified off.
          write:/1 sy-vline,
                 2 jtab-obj_name hotspot on,
                21 sy-vline ,
                22 modsapt-modtext,
                95 sy-vline.
        endloop.
        write:/(95) sy-uline.
        describe table jtab.
        skip.
        format color col_total intensified on.
        write:/ 'No of Exits:' , sy-tfill.
      else.
        format color col_negative intensified on.
        write:/(95) 'No User Exit exists'.
      endif.
    else.
      format color col_negative intensified on.
      write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first   screen.

  • Need to enter text in boxes

    I have created number of boxes using vertical and horizontal lines. Now I want to position texts exactly in the box where it needs to be. I know that there are tabs but how do i position the y axis. I want  some texts to enter in the first line of the boxes and then on the second line. Let me know how to position them.

    Hello Ramesh,
    I have same issue....I had designed a box by using sy-uline and sy-vline.
    But, I need to enter text in 2 differrent lines...in that box.
    Here is the code : 
    SKIP TO LINE 1.
    ULINE AT 281(40).
    WRITE : /281 SY-VLINE, 282(41) 'Ventas Internas o Exportación Gravadas', 320 SY-VLINE.
    It is displaying properly in that box. BUt the requirement is I need to display the test in 2 diff lines as specified:
                     Ventas Internas o
                  Exportación Gravadas
    This trequirement is very urgent for me...any suggestions would be appreciated.
    Thank you
    Keats.

  • Printing of boxes in Main window of SAP Script at 2 different locations

    Hi Experts,
      I have an requriement in SAP script, I want to draw two boxes. The first box will be at the beginging of main window with 0.5 cm, which is comming perfectly. After the first box I have to display the entries related to a particular table, after the completion of that table I need to draw another box of lenght 0.5cm and the entries related to another table, needs to be displayed.
    I am able to get the first box with intensity, but for the second box I am not getting exact position where i need to draw a dynamic box by filling intensity.
    For that reason i have drawn two ulines and wrote the text, is there any way to fill internsity in between those lines.
    Thanks
    Ravi.

    Hi Sujeet,
    I already tried with that command, the problem is in between two boxes I dont know how many lines of data will come.
    There is a need of drawing a box dynamically.
    Thanks
    Ravi

  • DRWAING BOXES IN MAIN WINDOW

    HOW TO DRAW BOXES IN MAIN WINDOW WITH OUT USING BOX XPOS

    u can draw dynamic boxes by using uline n vline options. But it takes a lot of time, and is suggestible only if it is very critical. Just try out.
    By using uline and vline, you can draw lines dynamically. Also u can specify the width too ... eg ... uline(120). Dont forget to specify the font style ans size of the font.

  • Creating radio buttons and text box in the screen

    Hi Guys,
    Need help asap. I am writing a report and I have to create text box for user to input GL account numbers for two types of customer. I have to make these fields required and take the data back from the screen and write it in a file. The second thing that I have to do is to make radio buttons for the user to select whether he wants the file written on the application server or the presentation server. and process the report accordingly. Now can somebody please given some code and tell me how I should do this. Both the things have to be done for the same report. Please help.
    Thanks,
    Minal

    Hi,
    TABLES: likp,
            lips.
    TYPES: Begin of ty_likp,
           vbeln like likp-vbeln,
         end of ty_likp.
    TYPES: Begin of ty_lips,
           vbeln like lips-vbeln,
           posnr like lips-posnr,
         end of ty_lips.
    DATA:  i_likp TYPE STANDARD TABLE OF ty_likp,
           i_lips TYPE STANDARD TABLE OF ty_lips,
           w_lips TYPE ty_lips,
           w_likp TYPE ty_likp.
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:  s_delno FOR likp-vbeln,
                     s_type  FOR likp-lfart,
                     s_ship  FOR likp-vstel,
                     s_date  FOR likp-erdat.
    SELECTION-SCREEN END OF BLOCK b_0.
    SELECT vbeln
             FROM likp INTO TABLE i_likp
             WHERE vbeln IN s_delno
             AND   lfart IN s_type
             AND   vstel IN s_ship
             AND   erdat IN s_date.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH text-002.
        " No valid deliveries for the selection parameters entered.
        STOP.
      ENDIF.
      IF NOT i_likp[] IS INITIAL.
        SELECT vbeln
               posnr
               FROM lips INTO TABLE i_lips
               FOR ALL ENTRIES IN i_likp
               WHERE vbeln = i_likp-vbeln.
      ENDIF.
    format color 1 on intensified on.
      WRITE: /01(46) 'Following are the Hanging Deliveries/Invoices:'.
    format color off intensified off.
    skip.
    format color 1 on.
      WRITE:  SY-ULINE(27).
      WRITE: /1       SY-VLINE,
              3(12)    'Document No.',
              16      SY-VLINE,
              17(8)  'Item No.',
              27      SY-VLINE.
    write:/1 sy-ULINE(27).
    format color off.
      sort i_lips by vbeln posnr.
      LOOP AT i_lips INTO w_lips.
          Read table i_likp into w_likp with key
                            vbeln = w_lips-vbeln
                            posnn = w_lips-posnr.
          if sy-subrc <> 0.
          format color 2 on.
             WRITE: /1   sy-vline,
                    3(12)  w_lips-vbeln,
                    16  sy-vline,
                    17(8)  w_lips-posnr,
                    27  sy-vline.
            write:/1 sy-uline(27).
            format color off.
            clear w_lips.
          endif.
          ENDLOOP.
    Try this one with ur own example.
    Thanks & Regards,
    Judith.

  • ALV GRID-how to select all the check boxes using push button

    Hai All,
    I displayed ALV grid & every record contains one check box as first column.
    If user clicks on one push button all the check boxes needs to selected.
    Could any one tell me how to do this?
    Regards,
    Bhaskar

    Hi Bhaskar,
       Try this code :
    *" Table declarations...................................................
    TABLES :
      spfli.                              " Flight Schedule
    *" Data declarations...................................................
    Work variables                                                      *
    DATA :
      w_checkbox  TYPE c,                  " Check Box
      w_checkbox1 TYPE c,                  " Check Box
      w_lineno    LIKE sy-lilli,           " Current Line No
      w_lines     TYPE i.                  " No. Of Records in Int.Table
    Internal table to hold Flight Schedule data                         *
    DATA :
       t_spfli LIKE
      STANDARD TABLE
            OF spfli.
    Structure to hold Function Codes                                    *
    DATA :
      fs_fcode LIKE LINE OF t_fcode.
                          TOP-OF-PAGE EVENT                             *
    TOP-OF-PAGE.
      PERFORM top_of_page.
                       START-OF-SELECTION EVENT                         *
    START-OF-SELECTION.
      PERFORM fetch_spfli_data.
      SET PF-STATUS 'YMENU1'.
      DESCRIBE TABLE t_spfli LINES w_lines.
      fs_fcode = 'EXIT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'SELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'DESELECT'.
      APPEND fs_fcode TO t_fcode.
      fs_fcode = 'RETRIEVE'.
      APPEND fs_fcode TO t_fcode.
                        AT USER-COMMAND EVENT                           *
    AT USER-COMMAND.
      PERFORM user_command.
    FORM top_of_page .
      WRITE :/50 'Flight Schedule Information'(008).
      ULINE.
      FORMAT COLOR 1.
      WRITE :/10 'Carrier ID'(001),
              25 'Connection ID'(002) ,
              43 'Airport From'(003),
              59 'Airport To'(004),
              74 'Departure Time'(007),
              93 'Arrival Time'(011),
             106 space.
    ENDFORM.                               " FORM TOP_OF_PAGE
    FORM fetch_spfli_data .
      SELECT carrid                        " Carrier ID
             connid                        " Connection ID
             airpfrom                      " Airport From
             airpto                        " Airport To
             deptime                       " Departure Time
             arrtime                       " Arrival Time
        FROM spfli
        INTO CORRESPONDING FIELDS OF
       TABLE t_spfli.
      IF sy-subrc EQ 0.
        PERFORM display_spfli_data.
      ENDIF.                               " IF SY-SUBRC EQ 0
    ENDFORM.                               " FORM FETCH_SPFLI_DATA
    FORM display_spfli_data .
      SORT t_spfli BY carrid ASCENDING.
      LOOP AT t_spfli INTO spfli.
        FORMAT COLOR 2.
        WRITE :/2 w_checkbox AS CHECKBOX,
                  spfli-carrid   UNDER text-001,
                  spfli-connid   UNDER text-002,
                  spfli-airpfrom UNDER text-003,
                  spfli-airpto   UNDER text-004,
                  spfli-deptime  UNDER text-007,
                  spfli-arrtime  UNDER text-011.
      ENDLOOP.                             " LOOP AT T_SPFLI...
    ENDFORM.                               " FORM DISPLAY_SPFLI_DATA
    FORM user_command .
      CASE sy-ucomm.
        WHEN 'SELECT'.
          w_checkbox1 = 'X'.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'DESELECT'.
          w_checkbox1 = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno.
            IF w_checkbox = '*'.
              CONTINUE.
            ELSE.
              MODIFY LINE w_lineno FIELD VALUE w_checkbox FROM w_checkbox1.
            ENDIF.                         " IF W_CHECKBOX = '*'
          ENDDO.                           " DO W_LINES TIMES.
        WHEN 'RETRIEVE'.
          w_checkbox = ' '.
          DO w_lines TIMES.
            w_lineno = sy-index + 3.
            READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox.
            IF w_checkbox = 'X'.
              PERFORM fetch_sflight_data.
              PERFORM display_sflight_data.
            ENDIF.                         " IF W_CHECKBOX = 'X'
          ENDDO.                           " DO W_LINES TIMES.
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " FORM USER_COMMAND
    This report gives you the SPFLI Data and places a check box in front of each record. When u click on select all button it will select all the records. And if you click on deselect all it will deselect all the records. When you are trying this maintain the pf-status 'YMENU1' and give the function codes as in the code.
    Regards,
    Swapna.

  • SAPscript - Dynamic box position and height.

    Greetings...
    How to print dynamic box according to the Element. I have an element with looping condition when i used box the line only printed on the first loop, but and no line printed on the next looping even though its is  different element.. Below is the sneak peak of my code.
    /E 101
    /:   BOX WIDTH 0 MM HEIGHT '2' MM FRAME 20 TW
    /:   POSITION YORIGIN '+2' MM
    W2   <B>&text&</><B>,,&zvalue&</>
    Thank you

    Hi
    it is very hard to print a dynamic box with sapscript.
    It is more easy to develop a new-smartform then to develop a dynamic box.
    i know only 1 sapscript which is using dynamic boxes. I do not know the sapscript only the fucntional name we use. That is shopfloor papers (for a production order). It has a good combination of printprogram and sapscript which both has to be working together to get it done. Try to find it and study it. Then you will find out how it works.
      There is no way to get it done with only changes in your sapscript.
    an alternative is to use tab's and '|' and ulines to make something that look a bit like boxes.
    Hope this will help you out.
    Gr., Frank

  • Reports - Check Boxes

    Hi All,
    I'm not getting idea how to approach this requirement.
    My requirement is
    I have one report with check box for each record output in the list.
    Here in this report i'll check i.e. put tick mark in the check box, then the checked list of records should be written to the other report.
    Can you please let me know the solution.
    Jeevi.

    report Ztest no standard page heading.
    data: imara type table of mara with header line.
    data: check_box(1) type c,
          report_lines type i.
    start-of-selection.
    * Create the gui status with BACK button in standard place
    * and a READ button in the application toolbar
      set pf-status 'CHECK'.
      select * into corresponding fields of table imara
               from mara up to 100 rows.
      loop at imara.
        write:/ check_box as checkbox, imara-matnr, imara-matkl.
        hide imara-matnr.
      endloop.
      report_lines  = sy-linno - 1.
    top-of-page.
      write: 'List of materials'.
      uline.
    top-of-page during line-selection.
      write:  'Material.....'.
      uline.
    at user-command.
      case sy-ucomm.
        when 'READ'.
          check_box = space.
          set pf-status 'CHECK' excluding 'READ'.
          do report_lines times.
            read line sy-index field value check_box.
            if check_box = 'X'.
              write:/  'You have selected material', imara-matnr.
            endif.
          enddo.
      endcase.
    DEMO_LIST_READ_LINE
    refer this code if u want furtehr help.
    END-OF-SELECTION.
      lines = sy-linno - 1.
    SET PF-STATUS 'ZSTATUS'.
    AT USER-COMMAND.
          wa_output-cb = space.
          SET PF-STATUS 'ZSTATUS' EXCLUDING 'SAVE'.
          DO lines TIMES.
            READ LINE sy-index FIELD VALUE wa_output-cb.
              IF wa_output-cb = 'X'.
            MODIFY i_output  FROM wa_output INDEX sy-tabix TRANSPORTING cb.
            ENDIF.
          ENDDO.
    CASE sy-ucomm.
    WHEN 'SAVE'.
    *      DELETE i_output WHERE cb = 'X'.
       LOOP AT i_output WHERE cb = 'X'.
        MOVE i_output TO i_fina.
       APPEND i_final.
       ENDLOOP.
      ULINE.
      FORMAT INTENSIFIED OFF.
      FORMAT COLOR COL_HEADING.
      WRITE:/001 'CB' ,
             003 'Material No',
             015 'Mat type',
             024 'Mat group'.
      FORMAT COLOR OFF.
      FORMAT INTENSIFIED ON.
      ULINE.
      IF NOT i_output[] IS INITIAL.
        LOOP AT i_output INTO wa_output.
          WRITE:/001 wa_output-cb AS checkbox,
                 003 wa_output-matnr,
                 015 wa_output-mtart,
                 024 wa_output-matkl.
          CLEAR wa_output.
        ENDLOOP.
      ENDIF.
    WHEN 'BACK'.
    LEAVE SCREEN.
    ENDCASE.

  • Accessibility @ Simple Boxes

    hi developers,
    at the moment i m reading through a SAP-document about "Rules for Accessible ABAP Lists" at the moment, and there are rules for "Simple Boxes" mentioned.
    My question now is maybe really stupid, but how does the code for a "simple box" in an ABAP List looks like?! I mean, i know how to use simple boxes in dynpros but i don t know atm how to implement that in normal abap lists.
    can someone help me and show an accessible example for that?
    regards,  basti

    Hi,
    try this sample
      WRITE : / sy-uline(147).
      WRITE AT /1(1) '|'.
      WRITE AT 3(35) '          Fournisseurs'.
      WRITE AT 39(1) '|'.
      WRITE AT 41(33) '      Balance <<auxiliare>>'.
      WRITE AT 75(1) '|'.
      WRITE AT 77(33) '     Valorisation de stock'.
      WRITE AT 111(1) '|'.
      WRITE AT 113(33) '               Ecart'.
      WRITE AT 147(1) '|'.
    Ligne 2
      WRITE AT /1(1) '|'.
      WRITE AT 3(35) ''.
      WRITE AT 39(1) '|'.
      WRITE AT 41(33) '      Total des mouvements'.
      WRITE AT 75(1) '|'.
      WRITE AT 77(33) '     Total des mouvements'.
      WRITE AT 111(1) '|'.
      WRITE AT 113(33) '       Balance - Valorisation'.
      WRITE AT 147(1) '|'.
    Ligne 3
      WRITE AT /1(1) '|'.
      WRITE AT 3(35) ''.
      WRITE AT 39(1) '|'.
      WRITE AT 41(33) '       (607-609) période'.
      WRITE AT 75(1) '|'.
      WRITE AT 77(33) '           période'.
      WRITE AT 111(1) '|'.
      WRITE AT 113(33) ''.
      WRITE AT 147(1) '|'.
    Ligne 4
      WRITE AT /1(1) '|'.
      WRITE AT 39(1) '|'.
      WRITE AT 75(1) '|'.
      WRITE AT 111(1) '|'.
      WRITE AT 147(1)'|'.
    Ligne 5
      WRITE AT /1(1) '|'.
      WRITE AT 3(35) ''.
      WRITE AT 39(1) '|'.
      WRITE AT 41(14)'      D'.
      WRITE AT 56(1) '|'.
      WRITE AT 58(14)'      C'.
      WRITE AT 75(1) '|'.
      WRITE AT 77(14)'      SD'.
      WRITE AT 92(1) '|'.
      WRITE AT 94(14) '     SC'.
      WRITE AT 111(1) '|'.
      WRITE AT 113(14) '      D'.
      WRITE AT 129(1)  '|'.
      WRITE AT 131(14) '      C'.
      WRITE AT 147(1) '|'.
      WRITE : / sy-uline(147).
    *Boucle dans la table interne gt_etat
      LOOP AT gt_etat INTO gs_etat .
      WRITE AT /1(1) '|'.
      WRITE AT 3(35) gs_etat-name1.
      WRITE AT 39(1) '|'.
      ld_temp_text = gs_etat-sdebit_compt.
      WRITE AT 41(15) ld_temp_text.
      WRITE AT 56(1) '|'.
      WRITE AT 58(14) gs_etat-scredit_compt.
      WRITE AT 75(1) '|'.
      clear ld_temp_text.
      ld_temp_text = gs_etat-sdebit_stat.
      WRITE AT 77(15) ld_temp_text.
      WRITE AT 92(1) '|'.
      WRITE AT 94(14) gs_etat-scredit_stat.
      WRITE AT 111(1) '|'.
      clear ld_temp_text.
      ld_temp_text = gs_etat-ecart_sdebit.
      WRITE AT 113(15) ld_temp_text.
      WRITE AT 129(1)  '|'.
      WRITE AT 131(14) gs_etat-ecart_scredit.
      WRITE AT 147(1) '|'.
      ENDLOOP.
      WRITE : / sy-uline(147).
    Just replace the table .
    Reward if useful,
    Sooness.

Maybe you are looking for