Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Checking the check boxes

Hi,

I am uploading the data from excel to a custom table. I have Display data to display contents of the table from a report. How can I check the check boxes of the newly uploaded records using user command 'SELE'.

Thank you.

Neelu.

AT USER-COMMAND.
  CASE sy-ucomm.

    WHEN 'SELE'.
      SET PF-STATUS 'STAT'.
      IF chbox = 'X'.
        chbox = ' '.
      ELSEIF chbox = ' '.
        chbox = 'X'.
      ENDIF.
      PERFORM displaydata.




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.

  ENDLOOP.
  WRITE: /01(253) sy-uline.
  CLEAR gt_zprice.
ENDFORM.  

Tags:
Former Member
Former Member replied

Hello Neelu,

issue at your loop .

SELECT * FROM zppprice INTO TABLE gt5_zprice

WHERE crdate IN r_date.

LOOP AT gt5_zprice.

gt5_zprice-chbox = 'X'.

Modify gt5_zprice. ““ Should not write Append command ( since same internal table within loop ,append will not work

ENDLOOP.

SELECT * FROM zppprice INTO TABLE gt1_zprice.

LOOP AT gt1_zprice.

gt1_zprice-chbox = ' '.

modify gt1_zprice. “ Should not write Append command ( since same internal table within loop ,append will not work

ENDLOOP.

APPEND LINES OF gt1_zprice TO gt5_zprice.

Thanks

Seshu

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question