Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update check box value through the modulepool

Former Member
0 Kudos

Hi,

In CRM BP transaction i have added one check box in the status tab.Then if i check that box the value should go and update in the data base with 'X'.How to do this through the module pool.

May be simple question ,but i am not getting idea.

Thanks,

Mohan Rao

3 REPLIES 3

Former Member
0 Kudos

hiii

use like below code

DATA:
   w_check  TYPE c.

AT SELECTION-SCREEN.

   IF p_char EQ 'X'.
    w_check = 'X'.
    WRITE: w_check.
  ELSE.
    w_check = ' '.
    WRITE: w_check.
  ENDIF.

use in query like below

SELECT b~carrid                      "Carrier Id
         b~connid                      "Connection id
         b~fldate                      "Flight date
         b~price                       "Price
         a~cityfrom                    "City From
         a~cityto                      "City To
         c~bookid                      "Booking Id
         c~order_date                  "Order Date
         c~custtype                    "Customer Type
         c~cancelled                   "Cancelled Date
         c~customid                    "Customer Id

 INTO TABLE t_flight
 FROM spfli AS a
       INNER JOIN sflight AS b ON a~carrid = b~carrid
      INNER JOIN sbook AS c ON c~carrid = b~carrid AND
                                       c~connid = b~connid AND
                                       c~fldate = b~fldate
          WHERE b~carrid IN s_carrid AND
                a~cityfrom IN s_depart AND
                a~cityto IN s_city AND
                b~fldate IN s_fldate AND
                c~bookid IN s_bookno AND
                c~order_date IN s_postdt AND
                a~deptime IN s_dptime AND
                c~custtype EQ w_temp AND
                c~cancelled EQ w_check.

regards

twinkal

Former Member
0 Kudos

Hi,

When you tick mark the checkbox on the Screen, corresponding table will be filled with the X in that field....

If you are using the Table Control... You will have to use the LOOP .... ENDLOOP. in the PAI...

For ALV Grid,

Use method CHECK_CHANGED_DATA....

Corresponding internal table will be updated with the changed data from screen....

Use MODIFY statement to change the data into Database...

Regards,

Kunjal

Former Member
0 Kudos

Hi ,

In the PAI event ,when you select the checkbox and hot an event say enter or any other button ,the system code will be trapped and then value of checkbox with be read with name of paramater of checkbox ,in this way you can update the database with 'X' when selected.