Reg : Check boxes

Hi Experts ,
Im Having 3 select-options on my selection screen !!
after that im having 3 check boxes.. first checkbox default it wil be selected.
Now My query is ??
1. when i execute default the first check box & process has to be exexute ?
2. pls give an example abt at selsection-screen output.
Regs,
Narayana

hi,
Chk this sample.
tables: mara, marc.
parameters: p_matnr like mara-matnr obligatory,
            p_matkl like mara-matkl,
            p_werks like marc-werks.
at selection-screen output.
   select mara~matnr mara~matkl marc~werks
          into (p_matnr, p_matkl, p_werks)
          from mara
          inner join marc
          on mara~matnr = marc~matnr
          where mara~matnr = p_matnr.
   endselect.
Regards
Reshma

Similar Messages

  • Reg: Check boxes in ALV Display

    Hi Experts,
    I have a problem with ALV Display. I am able to display the contents in output.
    But my client requirement is, they need to insert 'check boxes' before each record.
    I hope you understood. any way let me explain some thing...
    I am displaying records in ALV, but they need check boxes before each record. Like.... you can see database tables. in database tables like MARA.. it will display
    check box    client   field1   field2   field3.......................
    Please help me in this regard.....
    Thanks in Advance
    Sai babu

    Hi This is my code,
    As of you people suggested me, i write like this.... but it is not working....
    please guide me....
    FORM SUB_DISP_REP .
    PERFORM SUB_FIELD_DEF USING :
                                  ' ' '1' 'PERNR' 'Personnel Number' ' ' ' ' ' ' ,
                                  ' ' '2' 'STAT2' 'Employee Status' '' '' '' ,
                                  ' ' '3' 'STELL' 'Job Title' '' '' '' ,
                                  ' ' '4' 'VORNA' 'First Name' '' '' '' ,
                                  ' ' '5' 'NACHN' 'Last Name' '' '' '' ,
                                  ' ' '6' 'KTART' 'Absence Quota Type' '' '' '' ,
                                  ' ' '7' 'ANZHL' 'Number of Employee Time Quota' '' '' '' ,
                                  ' ' '8' 'KVERB' 'Deduction of Employee Time Quota' '' '' '' ,
                                  ' ' '9' 'QUONR' 'Counter for time quotas' '' '' '' ,
                                  ' ' '10' 'DESTA' 'Start Date for Quota Deduction' '' '' '' ,
                                  ' ' '11' 'DEEND' 'Quota Deduction to' '' '' '' .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
        I_CALLBACK_PROGRAM                = SY-CPROG
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = 'X'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = 'TRVPICTURE08'
        I_GRID_TITLE                      = 'EMPLOYEE ABSENCE QUOTA'
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
        IT_FIELDCAT                       = T_FCAT
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
        IT_SORT                           = T_SUBTOT
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = T_OUTPUT
    * 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.
    ENDFORM.                    " SUB_DISP_REP
    form SUB_FIELD_DEF  using P_chk TYPE char1
                              P_COL TYPE CHAR2
                              P_NAME TYPE CHAR10
                              P_TEXT TYPE CHAR40
                              P_SUM TYPE CHAR1
                              P_EDIT TYPE CHAR1
                              P_OUT TYPE CHAR1.
    W_FCAT-checkbox = 'X'.
    W_FCAT-COL_POS = P_COL .
    W_FCAT-FIELDNAME = P_NAME .
    W_FCAT-SELTEXT_M = P_TEXT .
    W_FCAT-DO_SUM = P_SUM .
    W_FCAT-EDIT = P_EDIT .
    W_FCAT-NO_OUT = P_OUT .
    APPEND W_FCAT TO T_FCAT .
    CLEAR W_FCAT .
    endform.                    " SUB_FIELD_DEF

  • Reg check boxes in ALV report

    Hi All,
    I am displaying check boxes in my ALV report.I want to capture what all are the values that has been selected in the basic list ALV accordingly I want to write the code for the secondary ALV list .Could you please suggest somebody how to capture this info?
    Regards
    Ramesh

    hi,
    here is the code...
    i havent checkbox but i have first filed of char type and u can select more than one record by pressing control...
    i have created one button DET in pf status and when i press on that i am getting detain info of selected record in secondary list...
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = gd_repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_ekko
        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.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "user presses SAVE
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
    *       text
    *      -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
    *       text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
    *       text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    reward if usefull....

  • Reg: Page Protection Check Box in Smartform

    Hi,
      In the folder node of the smart form, i want to use the check box ' Page Protection'. But the check box is disabled. Can any one guide me how to enable the check box. Thanks in advance.
    Rgds,
    Nagendra Prasad.J

    Hi,
    I did like that,
    I created one folder and I selected the checkbox in output options.
    when I am trying to create "TABLE" in that folder, it's automatically resetting the checkbox.
    error text "Page protection for node %FOLDER1 was reset"
    Plz. suggest me.......!
    Thanks & Regards
    Rajendra

  • How to add check boxes on plant data /storage tab of MM01/02/03 transaction

    Hello experts,
    I want to add check boxes on plant data /storage tab of MM01/02/03 transaction.
    How can we achieve this?
    Thanks for your help in advance!

    Hi Shriram Nimbolkar ,
    Go to tranx code : MM01 /MM02 / MM03
    1 ) System-->Status , here copy the program
    2) Go to abap editor ,specify the program name and copy the package
    3) Go to CMOD or SMOD
          CMOD>Utilites-> SAP Enanchements, Here specify the package and execute it..
      4) Displays multiple exists,
          check the suitable exists and insert the code in particular screen...
    Reg
    Siva Prasad

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • How to select One Check Box at a time

    Dear All
    I have 10 records in details blok and also I have 10 check boxes .
    I want user can only check one check box at a time .
    For example If first record I have checked and i am trying to check the last record then the first record UNCHECKED and the last record will checked .
    Like how redio buttons work ..
    How can i do that ..?
    I have done like this :-
    1st I have declare a global variable in PRE_FORM :GLOBAL.CNT := 'N';
    Then
    WHEN-CHECKBOX-CHANGED trigger
    IF CHECKBOX_CHECKED(EMP.CHK') THEN
        IF :GLOBAL.CNT != N THEN
            :EMP.CHK := Null
       HERE what to write ???
            RAISE FORM_TRIGGER_FAILURE;
        ELSE
            :GLOBAL.CNT := Y;
        END IF;
    ELSE
        :GLOBAL.CNT := N;
    END IF;Edited by: LuKKa on Aug 29, 2012 1:12 PM
    Edited by: LuKKa on Aug 29, 2012 1:13 PM

    LuKKa,
    An easier method would be to use a Calculated Field to summarize the value of your CHECKBOX Item. For example, add a non-table item (call it SUM_CHECKED) to your detail block and do not assign it to canvas - so it will not be displayed. Then set the following properties of the SIM_CHECKED item:
    Database Item = No
    Calculation Mode = Summary
    Summary Function = Sum
    Summarized Block = <YOUR DETAIL BLOCK>
    Summarized Item = <YOUR CHECKBOX ITEM>
    Next, you will need to change your Detail Block property Query All Records to YES (this is required for the Calulated Item).
    Now, make sure your checkbox is data type NUMBER and has the following minimum properties set:
    Data Type = Number
    Maximum Length = 1
    Initial Value = 0
    Value when Checked = 1
    Value when Unchecked = 0
    Check Box Mapping of Other Values = Not Allowed or Unchecked
    Now, in your Checkbox Item's When-Checkbox-Changed trigger add code similar to this:
    IF ( CHECKBOX_CHECKED('YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM') ) THEN
       IF ( :YOUR_DETAIL_BLOCK.SUM_CHECKED > 1 ) THEN
       --Reset the checkbox
       :YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM := NULL;
       MESSAGE('You can only check one item.');
       Message(' ');
       RAISE Form_Trigger_Failure;
       END IF;
    END IF;I have confirmed this method works and it is more efficient than looping through your records to see if other checkboxes are checked.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Preventing disabling of check box - item okay in MIGO

    Dear all,
    In the MIGO transaction - during goods receipt for subcontractor material, when the item (incoming) is checked as item okay - automatically the child material (Material sent to subcontractor) is also activated thereby to enable 543 movement.
    Unfortunately some of the users are disabling the check box (for the material sent to the subcontractor). This prevents depletion of stock from the subcontractor but inflates the stock of the incoming material.
    Is there any way - either by authorisation check to prevent users disabling the check box or other methods?
    Experts suggestion is required in this regard.
    Thanks in advance.
    Regards,
    M.M

    Hi Magesh,
    it is possible. use Badi enhancement
    MB_MIGO_BADI goto
    IF_EX_MB_MIGO_BADI~POST_DOCUMENT
    tell your abaper to put the logic like
    parent ID and subcomponent ID need to select
    if either of two is not selected
    then error message will prompt not to save the GR doc since subcomponent is unselected.
    reference field EKPO check PSTYP
    hope this help you.
    regards,
    Maia
    Edited by: Maia on Apr 18, 2008 3:07 PM

  • Free Goods check box in PO, for Services

    Hello,
    Is there any way to activate the Free goods checkbox for Services (item category 'D') in Purchase Order.
    This field seems not to be available in the screen layout.
    Your support is highly appreciated.
    Regards,
    Vijay.

    Hi,
    Per SAP Note 0000634395, activation of Free Goods Check box for services in not possible.
    Though there is an option to make the services unaccountable, by marking the service as contingency item in the service details from the services tab.
    The subitem total is the aggregate of the subitem net values. This subitem total excludes subitems marked as contingency or alternate lines.
    Please refer to the link provided;
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/8d/7638d98f3f11d2b47f006094b93006/frameset.htm
    Regards,
    Sekhar.

  • Return Item and Free goods check box in purchase order

    Hi Guru:
    I just got the question regarding the return item and free goods check box,my question is that if I check the free good check box,then the price of the matieral will be charged to zero,however,if I want to issue the return purchase order to the vendor,does I need to check the return box first and then issue the return order to the vendor? Then go to MIGO transaction to select the movement type 122 to return the goods,what's the whole precedure for returning the goods to the vendor,can anybody tell me,very appriated!

    Hi,
    Retun to vendor through have two types....
    One is you have Po created, vendor send the item in that few items have rejected so you need to return the item to vendor......
    here in MIGo chose returrn to vendor selce the PO numbere.... system automaticaly take the movent type 122....
    sencond type is Retun PO..... In Po while creting the PO tick the return indication..
    If you do the GR system will pick 161mopvent type.. ( GR returns)...
    REgards
    anand

  • Unable to see other writer's checked check boxes in comments of shared review

    I'm using Acrobat 3D Version 8 in a Windows XP environment.  We are using SharePoint for shared reviews.
    We are able to see developer's comments, and we can respond back to the comments with a reply.  However, when we use the checkbox to indicate that a comment has been addressed, each writer can only see the checkmarks that she makes.  We cannot see checkmarks made by other writers.
    We have tried selecting the check box, and we have also used the check box icon to select the check box.  We then publish and the the action is accepted as a comment and is published.  But we are unable to see each other's check boxes.
    Why?
    Thanks!

    Solved on my own.
    Simply close BEx Analyzer and restart it again. If still it doesn't work then restart your computer and then run BEx Analyzer again, it will definitely work.
    TR.

  • How to add unique id to check box in a table

    Hi Experts,
    I have a static table in which more than 500 records appears in the table, so vertical scroll is displaying in the table. In each row, check boxes and text boxes displays with the data. When the check box is selected, I will do the calculation based on the selected check box and displays the calculated value to text control of respected row. To achieve this, I am triggering the event iterating the loop over the context to find which check box is selected. When the page gets refreshed, cursor moves to first record.
    Since all the check boxes having the same id, I am not able to get from which check box this event has got triggered.
    Is there a way to assign unique id to each check box so that I can assign parameter to the control and get from which check box event got triggered. I have tried to generate the table dynamically, even there I couldn't assign id to each check box.
    Please through light on this request
    Thanks
    Murthy

    It is not specific to any platform but common in all whether is CE or 7.0 follow the given procedure
    1. Create a common onLeadSelect of table say it      selectedRow
    2. Assign the same event in onToggle     selectedRow  of checkbox.
    3. Now loop it in such a way that
         if (wdContext.nodeAppinvoiceData().getLeadSelection() >= 0)
                   wdContext.currentAppinvoiceDataElement().setIsPreviewSelected(true);
                   if (wdContext.currentAppinvoiceDataElement().getIsSelected())
                        wdContext.currentAppinvoiceDataElement().setIsSelected(false);
                        for (int i = 0; i < wdContext.nodeAppinvoiceData().size(); i++)
                             boolean flag = wdContext.nodeAppinvoiceData().getAppinvoiceDataElementAt(i).getIsSelected();
                             if (flag)
                                  break;
                             else
                   else
                        wdContext.currentAppinvoiceDataElement().setIsSelected(true);
              wdContext.currentAppinvoiceDataElement().setIsPreviewSelected(false);
              wdContext.nodeAppinvoiceData().clearSelection();
              wdContext.nodeAppinvoiceData().setLeadSelection(-1);
    BR
    Satish Kumar

  • 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

  • Turkish Character and Check Box "?" Problem in XML Publisher

    In aplication and XML Publisher I must use Turkish Characters e.g. 'ş','ı','ğ','ç','ö' and check boxes. In html preview there is no problem, I can see all of them correctly. Hovewer in PDF preview in XML Publisher and also PDF output in Oracle Application all these Turkish Characters and Check Boxes looks like question mark (?). How can I solve this problem ?
    Thanks for helps....

    Hi Tim,
    Related to Special Italian characters, when I try with "Courier New" font with static data,the XML Preview display those characters.But when those chars come from XML source file,they get vanished.I tried two cases:
    Case1 ) IN EBS,I have attached courbi.ttf(font file) to the template manager(followed as per instructions in Font mapping section in User Guide).
    When I try running the report ,its getting completed with Warning.
    Case 2) I have also modified xdo.cfg ( as per Doc ID:400755.1 www.metalink.oracle.com)-
    In both cases ,I am not acheving the desired results.
    Please let me know where I am going wrong.
    Thanks and Regards,
    Kaveri

  • Urgent Help Required for Check Box in Table Column

    Hi all,
    Could any body help me to solve my problem?
    First of all I have created a table whose one column is check box. The column of the tables are Name,Phone,ID,Address and a checkBox columns.In one view
    the table will be found with data. I want to click on some of the rows(suppose there are 5 rows, but based on some condition I have selected the check box of 3 rows).
    Next there will be a button(Supose SEND Button).
    After selecting the check box I want to press that button and then a new window will come which will show two tables. one for  selected rows(with the same columns name except check box) and another for Unchecked rows with the same column name(Name,Phone,ID,Address).
    Could any body help me by sending the details and code?
    Thanks and Regards.
    Sudip

    Hi Sudip,
    1) create custom controller and appropriate context structure there (dataNode(Name,Phone,ID,Address,Check))
    2) create view StartView. Map data node from custom controller to node in view. Create table and bind context node attributes to appropriate table columns.
    3) create view ResultView. Map data node from custom controller to node in view. Create 2 nodes (CheckedData, UncheckedData) with supply methods. Create filtering implementation in supply methods (add checked and unchecked node elements to appropriate nodes).
    4) create new window with resultView as default view
    4) in startView in button action handler put something like
         IWDWindowInfo _windowInfo = wdComponentAPI.getComponentInfo().findInWindows("Popup");
         IWDWindowManager manager = wdComponentAPI.getWindowManager();
         IWDWindow _window = manager.createWindow(_windowInfo, true);
         _window.open();        
    So, just tried localy and it works.
    Best regards, Maksim Rashchynski.

Maybe you are looking for