How to trigger pop-up window in report and update data base from report

Hi All,
I have a requirement, in a report output list to trigger a pop up window with some rejection codes corresponding to each sales order when i select from the output list. Also i need to update data base by selecting one of the rejection code in the pop-up window list for that sales order. Can any one please let me know how to achive this.
Also, i have check boxes for each record in the output list. Also, i have added one more check box as "Select All'. When select 'Sleect All' check box , all check boxes need to be checked, how to achieve this. PLease let me know.
Thanks in advance.
Regards,
Rajesh

Hi check this code of editable ALV report... I updated the data base with the changes made..in the editable ALV
*& Report ZJAY_EDIT_ALV
REPORT zjay_edit_alv.
* TYPE-POOLS *
TYPE-POOLS: slis.
* INTERNAL TABLES/WORK AREAS/VARIABLES
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
w_field TYPE slis_fieldcat_alv,
p_table LIKE dd02l-tabname,
dy_table TYPE REF TO data,
dy_tab TYPE REF TO data,
dy_line TYPE REF TO data.
* FIELD-SYMBOLS *
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_wa> TYPE ANY,
<dyn_field> TYPE ANY,
<dyn_tab_temp> TYPE STANDARD TABLE.
* SELECTION SCREEN *
PARAMETERS: tabname(30) TYPE c DEFAULT 'MARA',
lines(5) TYPE n DEFAULT 7.
* START-OF-SELECTION *
START-OF-SELECTION.
* Storing table name
p_table = tabname.
* Create internal table dynamically with the stucture of table name
* entered in the selection screen
CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_table->* TO <dyn_table>.
IF sy-subrc <> 0.
MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
LEAVE TO LIST-PROCESSING.
ENDIF.
* Create workarea for the table
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
* Create another temp. table
CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_tab->* TO <dyn_tab_temp>.
SORT i_fieldcat BY col_pos.
* Select data from table
SELECT * FROM (p_table)
INTO TABLE <dyn_table>
UP TO lines ROWS.
REFRESH <dyn_tab_temp>.
* Display report
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*& Form SET_PF_STATUS
* Setting custom PF-Status
* -->RT_EXTAB Excluding table
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD'. "copy it from SALV func group standard
ENDFORM. "SET_PF_STATUS
*& Form user_command
* Handling custom function codes
* -->R_UCOMM Function code value
* -->RS_SELFIELD Info. of cursor position in ALV
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Local data declaration
DATA: li_tab TYPE REF TO data,
l_line TYPE REF TO data.
* Local field-symbols
FIELD-SYMBOLS:<l_tab> TYPE table,
<l_wa> TYPE ANY.
* Create table
CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN li_tab->* TO <l_tab>.
* Create workarea
CREATE DATA l_line LIKE LINE OF <l_tab>.
ASSIGN l_line->* TO <l_wa>.
CASE r_ucomm.
* When a record is selected
WHEN '&IC1'.
* Read the selected record
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
rs_selfield-tabindex.
IF sy-subrc = 0.
* Store the record in an internal table
APPEND <dyn_wa> TO <l_tab>.
* Fetch the field catalog info
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = p_table
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
* Make all the fields input enabled except key fields
w_field-input = 'X'.
MODIFY i_fieldcat FROM w_field TRANSPORTING input
WHERE key IS INITIAL.
ENDIF.
* Display the record for editing purpose
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
it_fieldcat = i_fieldcat
i_screen_start_column = 10
i_screen_start_line = 15
i_screen_end_column = 200
i_screen_end_line = 20
TABLES
t_outtab = <l_tab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
* Read the modified data
READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
* If the record is changed then track its index no.
* and populate it in an internal table for future
* action
IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
<dyn_wa> = <l_wa>.
i_index = rs_selfield-tabindex.
APPEND i_index.
ENDIF.
ENDIF.
ENDIF.
* When save button is pressed
WHEN 'SAVE'.
* Sort the index table
SORT i_index.
* Delete all duplicate records
DELETE ADJACENT DUPLICATES FROM i_index.
LOOP AT i_index.
* Find out the changes in the internal table
* and populate these changes in another internal table
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
IF sy-subrc = 0.
APPEND <dyn_wa> TO <dyn_tab_temp>.
ENDIF.
ENDLOOP.
* Lock the table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
* Modify the database table with these changes
MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
REFRESH <dyn_tab_temp>.
* Unlock the table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table.
ENDIF.
ENDCASE.
rs_selfield-refresh = 'X'.
ENDFORM. "user_command

Similar Messages

  • How to raise pop up window along with radio buttons in module pool program

    how to raise pop up window along with radio buttons in module pool program

    FUNCTION zscheme_determination.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_KUNNR) TYPE  KUNNR
    *"  EXPORTING
    *"     REFERENCE(E_VALUE) TYPE  NETWR_AK
    *"  TABLES
    *"      G_ITEM_DATA_ITAB STRUCTURE  ZITEM_DATA
    *  TYPES: BEGIN OF ty_sord,
    *         include type ZSD_SCHEME_DTL,
    *         END   OF ty_sord.
    *  data : gt_sord type standard table of ZSD_SCHEME_DTL,
    *         wa_sord type ZSD_SCHEME_DTL.
    *  select * from ZSD_SCHEME_DTL into table
    *  gt_sord
    *  where matnr = i_matnr.
    *  T_ITEM_DATA
    *********Data Declarations
       DATA:
             salesdocumentin LIKE bapivbeln-vbeln,
             orderheaderin LIKE bapisdhd1,
             orderheaderinx LIKE bapisdhd1x,
             sender LIKE bapi_sender,
             binaryrelationshiptype LIKE bapireltype-reltype,
             intnumberassignment LIKE bapiflag-bapiflag,
             behavewhenerror LIKE bapiflag-bapiflag,
             logicswitch LIKE bapisdls,
             testrun LIKE bapiflag-bapiflag,
             convert LIKE bapiflag-bapiflag,
             return LIKE bapiret2 OCCURS 0,
             orderitemsin LIKE bapisditm OCCURS 0,
             orderitemsinx LIKE bapisditmx OCCURS 0,
             orderpartners LIKE bapiparnr OCCURS 0,
             orderschedulesin LIKE bapischdl OCCURS 0,
             orderschedulesinx LIKE bapischdlx OCCURS 0,
             orderconditionsin LIKE bapicond OCCURS 0,
             orderconditionsinx LIKE bapicondx OCCURS 0,
             ordercfgsref LIKE bapicucfg OCCURS 0,
             ordercfgsinst LIKE bapicuins OCCURS 0,
             ordercfgspartof LIKE bapicuprt OCCURS 0,
             ordercfgsvalue LIKE bapicuval OCCURS 0,
             ordercfgsblob LIKE bapicublb OCCURS 0,
             ordercfgsvk LIKE bapicuvk OCCURS 0,
             ordercfgsrefinst LIKE bapicuref OCCURS 0,
             orderccard LIKE bapiccard OCCURS 0,
             ordertext LIKE bapisdtext OCCURS 0,
             orderkeys LIKE bapisdkey OCCURS 0,
             extensionin LIKE bapiparex OCCURS 0,
             partneraddresses LIKE bapiaddr1 OCCURS 0.
       DATA : wa_orderpartners LIKE bapiparnr,
              wa_orderitemsin LIKE bapisditm,
              wa_orderitemsinx LIKE bapisditmx,
              wa_orderschedulesin LIKE bapischdl,
              wa_orderschedulesinx LIKE bapischdlx,
              wa_orderconditionsin LIKE bapicond,
              wa_orderconditionsinx LIKE bapicondx,
              wa_return LIKE bapiret2,
              lv_value TYPE netwr_ak.
       DATA : lv_dtyp TYPE char45,
              lv_sorg TYPE vkorg,
              lv_sdch TYPE vtweg,
              lv_sdiv TYPE spart.
       TYPES : BEGIN OF ty_sord,
               zsdscheme TYPE comt_scheme_id,
               posnr TYPE posnr_va,
               matnr TYPE matnr,
               disc_type TYPE rebate_disc_type,
               calc_type TYPE catyp,
               qty_from TYPE kwmeng,
               qty_to TYPE kwmeng,
               spart TYPE spart,
               custcondgrp TYPE kdkg1,
               werks TYPE werks_d,
               matmn TYPE matnr,
               END   OF ty_sord.
       DATA : gt_sord   TYPE STANDARD TABLE OF ty_sord,
              gt_sordd  TYPE STANDARD TABLE OF ty_sord,
              wa_sord TYPE ty_sord,
              wa_knvv TYPE knvv,
              lv_cal_foc TYPE p DECIMALS 3,
              lv_cal_dis TYPE p DECIMALS 3,
              lv_new_qty TYPE kwmeng,
              lv_posmat TYPE posnr_va,
              lv_posfoc TYPE posnr_va.
       DATA:lv_diff TYPE kwmeng.
    ******Schemes Selection Logic
    * Get Valid Schemes
    * Validate Scheme for validity Period, Material, Customer Type and Plant
       TYPES : BEGIN OF ty_rtab,
               sign   TYPE c LENGTH 1,
               option TYPE c LENGTH 2,
               low    LIKE mara-matnr,
               high   LIKE mara-matnr,
             END OF ty_rtab.
    *  TYPES : ty_matnr TYPE RANGE OF ty_rtab.
       DATA : it_matnr TYPE TABLE OF ty_rtab,
              wa_matnr TYPE ty_rtab,
              wa_it    TYPE zitem_data,
             wa_tab TYPE zitem_data.
    *order table declaration
       TYPES:
             BEGIN OF ty_order,
               zsdscheme TYPE comt_scheme_id,
               matnr     TYPE matnr,
               kwmeng    TYPE kwmeng,
             END OF ty_order,
       BEGIN OF ty_scheme,
        zsdscheme TYPE comt_scheme_id,
    *                matnr     TYPE matnr,
        kwmeng    TYPE kwmeng,
      END OF ty_scheme.
       DATA:
             gt_order      TYPE TABLE OF ty_order,
             gt_scheme     TYPE TABLE OF ty_scheme,
              wa_scheme    TYPE ty_scheme,
              wa_order     TYPE  ty_order.
       DATA:i_kwmeng TYPE kwmeng.
    * Transfer all the material received from order to internal table
       LOOP AT g_item_data_itab INTO wa_it.
         MOVE : wa_it-matnr TO wa_matnr-low,
                'I'          TO wa_matnr-sign,
                'EQ'         TO wa_matnr-option.
         APPEND wa_matnr TO it_matnr.
         CLEAR wa_it.
       ENDLOOP.
    * Get the Valid Schemes based on given criteria
       SELECT
               zsd_scheme_dtl~zsdscheme
               zsd_scheme_dtl~posnr
               zsd_scheme_dtl~matnr
               zsd_scheme_dtl~disc_type
               zsd_scheme_dtl~calc_type
               zsd_scheme_dtl~qty_from
               zsd_scheme_dtl~qty_to
               zsd_scheme~spart
               zsd_scheme_hdr~custcondgrp
               zsd_scheme_hdr~werks
               zsd_scheme_hdr~matnr
       FROM zsd_scheme_hdr
       INNER JOIN zsd_scheme ON zsd_scheme~zsdscheme = zsd_scheme_hdr~zsdscheme
       INNER JOIN zsd_scheme_dtl ON zsd_scheme_dtl~zsdscheme = zsd_scheme_hdr~zsdscheme
       INTO TABLE  gt_sord
       WHERE  zsd_scheme_dtl~matnr IN it_matnr
    *    zsd_scheme_hdr~matnr IN it_matnr
    *    AND zsd_scheme_hdr~werks = '1509'
         AND zsd_scheme_hdr~werks = '1529'
         AND zsd_scheme_hdr~custcondgrp = '01'
         AND zsd_scheme~datuv LE sy-datum
         AND zsd_scheme~datub GE sy-datum.
       SORT gt_sord BY zsdscheme ASCENDING.
    *  LOOP AT gt_sord INTO wa_sord.
    *    READ TABLE g_item_data_itab INTO wa_it WITH  KEY matnr = wa_sord-matnr.
    *    wa_order-zsdscheme = wa_sord-zsdscheme.
    *    wa_order-matnr = wa_it-matnr.
    *    wa_order-kwmeng = wa_it-kwmeng.
    *    COLLECT wa_order INTO gt_order.
    *    CLEAR wa_order.
    *  ENDLOOP.
       LOOP AT g_item_data_itab INTO wa_it.
         READ TABLE gt_sord INTO wa_sord WITH  KEY matnr = wa_it-matnr.
         wa_order-zsdscheme = wa_sord-zsdscheme.
         wa_order-matnr = wa_it-matnr.
         wa_order-kwmeng = wa_it-kwmeng.
         COLLECT wa_order INTO gt_order.
         MOVE : wa_sord-zsdscheme  TO wa_scheme-zsdscheme,
                wa_it-kwmeng  TO wa_scheme-kwmeng.
         COLLECT wa_scheme INTO gt_scheme.
         CLEAR : wa_order, wa_scheme.
       ENDLOOP.
       CLEAR wa_scheme.
       DATA w_line TYPE sy-tabix.
    * Updating table based on Schemes
       LOOP AT gt_scheme INTO wa_scheme.
         CLEAR w_line.
         gt_sordd[] = gt_sord[].
    *    DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme and disc_type NE 'FOC'.
         DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme AND disc_type NE 'F'.
         DELETE ADJACENT DUPLICATES FROM gt_sordd COMPARING zsdscheme matnr.
         DESCRIBE TABLE gt_sordd LINES w_line.
         IF w_line GT 1.
    * popup message to select one foc type.
         ELSE.
           CLEAR wa_sord.
           READ TABLE gt_sordd INTO wa_sord INDEX 1.
           IF sy-subrc EQ 0.
             i_kwmeng = wa_scheme-kwmeng.
             lv_cal_foc = i_kwmeng DIV wa_sord-qty_from.
             lv_cal_dis = i_kwmeng MOD wa_sord-qty_from.
             MOVE : lv_cal_foc TO wa_it-kwmeng,
                    wa_sord-matnr TO wa_it-matnr.
             APPEND  wa_it TO g_item_data_itab.
             SORT gt_order BY kwmeng DESCENDING.
             LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
               IF lv_cal_dis GT 0.
    *        LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme
    *                                             AND lv_cal_dis GT 0.
    *                  LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
    *                LOOP AT g_item_data INTO wa_item_data WHERE matnr EQ wa_order-matnr.
                         LOOP AT g_item_data_itab INTO wa_tab WHERE matnr EQ wa_order-matnr.
                           wa_orderconditionsin-itm_number = wa_tab-posnr.
    *                  wa_orderconditionsin-itm_number = wa_item_data-posnr.
                           wa_orderconditionsin-cond_st_no = '001'.
    *                  IF gt_sordd-calc EQ ‘post AND disc_type EQ ‘percentage’.
                           IF wa_sord-calc_type EQ 'O' AND wa_sord-disc_type EQ 'P'.
                             wa_orderconditionsin-cond_type = 'ZTPB'.   "'ZREG'.
    *                  ELSEIF gt_sordd-calc EQ ‘pre’ AND disc_type EQ ‘percentage’
                           ELSEIF wa_sord-calc_type EQ 'E' AND wa_sord-disc_type EQ 'P'.
                             wa_orderconditionsin-cond_type = 'ZTPP'.   "'ZREG'.
                           ENDIF.
                           wa_orderconditionsin-currency = 'INR'.
                           wa_orderconditionsin-conpricdat = sy-datum.
                           APPEND wa_orderconditionsin TO orderconditionsin.
                           CLEAR wa_orderconditionsin.
    *Update Discount Conditon
                         ENDLOOP.
    *                  ENDLOOP.
    *Modify balance of Item
                 CLEAR wa_tab.
                 READ TABLE g_item_data_itab INTO wa_tab WITH KEY matnr = wa_order-matnr.
                 IF sy-subrc EQ 0.
                   lv_diff = wa_tab-kwmeng - lv_cal_dis.
                   IF lv_diff GT 0.
                     wa_tab-kwmeng  = wa_tab-kwmeng - lv_cal_dis.
    *            MODIFY g_item_data TRANSPORTING kwmeng  index sy-tabix.
                     MODIFY g_item_data_itab INDEX sy-tabix FROM wa_tab TRANSPORTING kwmeng  .
                   ELSE.
                     wa_tab-kwmeng  =  lv_cal_dis.
                     lv_cal_dis  = lv_diff.
                     MODIFY g_item_data_itab INDEX sy-tabix FROM wa_tab TRANSPORTING kwmeng .
    *            MODIFY G_ITEM_DATA_ITAB TRANSPORTING kwmeng index sy-tabix.
                   ENDIF.
                   gt_sordd[] = gt_sord[].
                   DELETE gt_sordd WHERE zsdscheme NE wa_scheme-zsdscheme AND disc_type EQ 'F'.
                   DESCRIBE TABLE gt_sordd LINES w_line.
                   IF w_line GT 1.
                     SORT gt_sordd BY zsdscheme DESCENDING.
    *              SORT gt_sordd BY quantity DESCENDING.
                     CLEAR wa_sord.
    *              LOOP AT gt_sordd WHERE quantity_from LT wa_shceme-kwmeng AND quantity_to GT wa_shceme-kwmeng.
                     LOOP AT gt_sordd INTO wa_sord  WHERE qty_from LT wa_scheme-kwmeng AND qty_to GT wa_scheme-kwmeng.
    *             LOOP AT gt_order INTO wa_order WHERE scheme = wa_scheme-scheme.
                       LOOP AT gt_order INTO wa_order WHERE zsdscheme = wa_scheme-zsdscheme.
    *                LOOP AT g_item_data INTO wa_item_data WHERE matnr EQ wa_order-matnr.
                         LOOP AT g_item_data_itab INTO wa_tab WHERE matnr EQ wa_order-matnr.
                           wa_orderconditionsin-itm_number = wa_tab-posnr.
    *                  wa_orderconditionsin-itm_number = wa_item_data-posnr.
                           wa_orderconditionsin-cond_st_no = '001'.
    *                  IF gt_sordd-calc EQ ‘post AND disc_type EQ ‘percentage’.
                           IF wa_sord-calc_type EQ 'O' AND wa_sord-disc_type EQ 'P'.
                             wa_orderconditionsin-cond_type = 'ZDPD'.   "'ZREG'.
    *                  ELSEIF gt_sordd-calc EQ ‘pre’ AND disc_type EQ ‘percentage’
                           ELSEIF wa_sord-calc_type EQ 'E' AND wa_sord-disc_type EQ 'P'.
                             wa_orderconditionsin-cond_type = 'ZDPD'.   "'ZREG'.
                           ENDIF.
                           wa_orderconditionsin-currency = 'INR'.
                           wa_orderconditionsin-conpricdat = sy-datum.
                           APPEND wa_orderconditionsin TO orderconditionsin.
                           CLEAR wa_orderconditionsin.
    *Update Discount Conditon
                         ENDLOOP.
                       ENDLOOP.
                     ENDLOOP.
                   ELSE.
                   ENDIF.
                 ENDIF.
               ENDIF.
             ENDLOOP.
           ENDIF.
         ENDIF.
       ENDLOOP.
    *  select
    *          ZSD_SCHEME_DTL~ZSDSCHEME
    *          ZSD_SCHEME_DTL~POSNR
    *          ZSD_SCHEME_DTL~matnr
    *          ZSD_SCHEME_DTL~DISC_TYPE
    *          ZSD_SCHEME_DTL~CALC_TYPE
    *          ZSD_SCHEME_DTL~QTY_FROM
    *          ZSD_SCHEME_DTL~QTY_TO
    *          ZSD_SCHEME~SPART
    *          ZSD_SCHEME_HDR~CUSTCONDGRP
    *          ZSD_SCHEME_HDR~WERKS
    *          ZSD_SCHEME_HDR~MATNR
    *  from ZSD_SCHEME_DTL
    *  inner join ZSD_SCHEME on ZSD_SCHEME~ZSDSCHEME = ZSD_SCHEME_DTL~ZSDSCHEME
    *  inner join ZSD_SCHEME_HDR on ZSD_SCHEME_HDR~ZSDSCHEME = ZSD_SCHEME_DTL~ZSDSCHEME
    *  into table
    *  gt_sord
    *  where ZSD_SCHEME_DTL~matnr = i_matnr and
    *        ZSD_SCHEME~DATUV LE sy-datum and
    *        ZSD_SCHEME~DATUB GE sy-datum.
    *  break-point.
    * Process Common Logic for Schemes Processcing
       CLEAR wa_sord.
    * Convert FOC Quantity and Materials
    *  LOOP AT gt_sord INTO wa_sord.
    **   lv_cal = i_kwmeng / wa_sord-QTY_FROM.
    *    lv_cal_foc = i_kwmeng DIV wa_sord-qty_from.
    *    lv_cal_dis = i_kwmeng MOD wa_sord-qty_from.
    *  ENDLOOP.
    *lv_new_qty = i_kwmeng - lv_cal_dis.
    * Get the Sales Document Type
       SELECT SINGLE low
    FROM tvarvc
    INTO  lv_dtyp WHERE
    name = 'SD_DOC_TYPE'.
       SELECT SINGLE * FROM knvv INTO wa_knvv WHERE kunnr = i_kunnr.
       IF sy-subrc = 0.
         lv_sorg = wa_knvv-vkorg.
         lv_sdch = wa_knvv-vtweg.
         lv_sdiv = wa_knvv-spart.
       ENDIF.
    * Give the Popup for schemes with multiple FOC
    * Schemes Specific Processing
    * Schemes Specific Processing
       orderheaderin-doc_type = lv_dtyp.
       orderheaderin-sales_org = lv_sorg.
       orderheaderin-distr_chan = lv_sdch.
       orderheaderin-division = lv_sdiv.
       wa_orderpartners-partn_role = 'AG'.
       wa_orderpartners-partn_numb = i_kunnr.
       APPEND wa_orderpartners TO orderpartners.
    *    wa_ORDERPARTNERS-PARTN_ROLE = 'WE'.
    *    wa_ORDERPARTNERS-PARTN_NUMB = p_ship.
    *    append wa_ORDERPARTNERS to ORDERPARTNERS.
    * Item number begin
       CLEAR : lv_posmat.
       lv_posmat = lv_posmat + 10.
       wa_orderitemsin-itm_number = lv_posmat.
       wa_orderitemsin-material = wa_sord-matmn.  "i_matnr.
       wa_orderitemsin-target_qty = lv_new_qty.
    *  wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
       APPEND wa_orderitemsin TO orderitemsin.
       wa_orderitemsinx-itm_number = lv_posmat.
       wa_orderitemsinx-material = 'X'.
       wa_orderitemsinx-target_qty = 'X'.
       wa_orderitemsinx-target_qu = 'X'.
       APPEND wa_orderitemsinx TO orderitemsinx.
       wa_orderschedulesin-itm_number = lv_posmat.
       wa_orderschedulesin-sched_line = lv_posmat.
       wa_orderschedulesin-req_qty = lv_new_qty.
       APPEND wa_orderschedulesin TO orderschedulesin.
       wa_orderschedulesinx-itm_number = lv_posmat.
       wa_orderschedulesinx-sched_line = lv_posmat.
       wa_orderschedulesinx-req_qty  = 'X'.
       wa_orderschedulesinx-updateflag = 'X'.
       APPEND wa_orderschedulesinx TO orderschedulesinx.
       wa_orderconditionsin-itm_number = lv_posmat.
       wa_orderconditionsin-cond_st_no = '001'.
       wa_orderconditionsin-cond_type = 'ZDPD'.   "'ZREG'.
       wa_orderconditionsin-currency = 'INR'.
       wa_orderconditionsin-conpricdat = sy-datum.
       APPEND wa_orderconditionsin TO orderconditionsin.
       wa_orderconditionsinx-itm_number = lv_posmat.
       wa_orderconditionsinx-cond_st_no = '001'.
       wa_orderconditionsinx-cond_type = 'ZDPD'. "'ZREG'.
       wa_orderconditionsinx-updateflag = 'X'.
       wa_orderconditionsinx-cond_value ='X'.
       wa_orderconditionsinx-currency = 'X'.
       APPEND wa_orderconditionsinx TO orderconditionsinx.
    ****18/06Beg
    *  if not lv_cal_dis is initial.
    *    lv_posmat = lv_posmat + 10.
    *    wa_ORDERITEMSIN-ITM_NUMBER = lv_posmat.
    *    wa_ORDERITEMSIN-MATERIAL = WA_SORD-MATMN.  "i_matnr.
    *    wa_ORDERITEMSIN-TARGET_QTY = lv_cal_dis.
    **  wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
    *    append wa_ORDERITEMSIN to ORDERITEMSIN.
    *    wa_ORDERITEMSINX-ITM_NUMBER = lv_posmat.
    *    wa_ORDERITEMSINX-MATERIAL = 'X'.
    *    wa_ORDERITEMSINX-TARGET_QTY = 'X'.
    *    wa_ORDERITEMSINX-TARGET_QU = 'X'.
    *    append wa_ORDERITEMSINX to ORDERITEMSINX.
    *    wa_ORDERSCHEDULESIN-ITM_NUMBER = lv_posmat.
    *    wa_ORDERSCHEDULESIN-SCHED_LINE = lv_posmat.
    *    wa_ORDERSCHEDULESIN-REQ_QTY = lv_cal_dis.
    *    append wa_ORDERSCHEDULESIN to ORDERSCHEDULESIN.
    *    wa_ORDERSCHEDULESINX-itm_number = lv_posmat.
    *    wa_ORDERSCHEDULESINX-sched_line = lv_posmat.
    *    wa_ORDERSCHEDULESINX-req_qty  = 'X'.
    *    wa_ORDERSCHEDULESINX-updateflag = 'X'.
    *    append wa_ORDERSCHEDULESINX to ORDERSCHEDULESINX.
    *  endif.
    *  lv_posmat = lv_posmat + 10.
    *  wa_ORDERITEMSIN-ITM_NUMBER = lv_posmat.
    *  wa_ORDERITEMSIN-MATERIAL = i_matnr.  "WA_SORD-MATMN.
    *  wa_ORDERITEMSIN-TARGET_QTY = LV_CAL_FOC.
    *  wa_ORDERITEMSIN-ITEM_CATEG = 'ZDGN'.
    **  wa_ORDERITEMSIN-TARGET_QU = i_VRKME.
    *  append wa_ORDERITEMSIN to ORDERITEMSIN.
    *  wa_ORDERITEMSINX-ITM_NUMBER = lv_posmat.
    *  wa_ORDERITEMSINX-MATERIAL = 'X'.
    *  wa_ORDERITEMSINX-TARGET_QTY = 'X'.
    *  wa_ORDERITEMSINX-TARGET_QU = 'X'.
    *  wa_ORDERITEMSINX-ITEM_CATEG = 'X'.
    *  append wa_ORDERITEMSINX to ORDERITEMSINX.
    *  wa_ORDERSCHEDULESIN-ITM_NUMBER = lv_posmat.
    *  wa_ORDERSCHEDULESIN-SCHED_LINE = lv_posmat.
    *  wa_ORDERSCHEDULESIN-REQ_QTY = LV_CAL_FOC.
    *  append wa_ORDERSCHEDULESIN to ORDERSCHEDULESIN.
    *  wa_ORDERSCHEDULESINX-itm_number = lv_posmat.
    *  wa_ORDERSCHEDULESINX-sched_line = lv_posmat.
    *  wa_ORDERSCHEDULESINX-req_qty  = 'X'.
    *  wa_ORDERSCHEDULESINX-updateflag = 'X'.
    *  append wa_ORDERSCHEDULESINX to ORDERSCHEDULESINX.
    ****18/06End
    * Item number end
    * Switch off dialog (BAPIs always run without)
       CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
       CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
         EXPORTING
    *     SALESDOCUMENTIN               =
         order_header_in               = orderheaderin
    *     ORDER_HEADER_INX              =
    *     SENDER                        =
    *     BINARY_RELATIONSHIPTYPE       =
    *     INT_NUMBER_ASSIGNMENT         =
    *     BEHAVE_WHEN_ERROR             =
    *     LOGIC_SWITCH                  =
    *     TESTRUN                       =
    *     CONVERT                       = ' '
    *   IMPORTING
    *     SALESDOCUMENT                 =
       TABLES
         return                        = return
         order_items_in                = orderitemsin
         order_items_inx               = orderitemsinx
         order_partners                = orderpartners
         order_schedules_in            = orderschedulesin
         order_schedules_inx           = orderschedulesinx
         order_conditions_in           = orderconditionsin
         order_conditions_inx          = orderconditionsinx
    *     ORDER_CFGS_REF                =
    *     ORDER_CFGS_INST               =
    *     ORDER_CFGS_PART_OF            =
    *     ORDER_CFGS_VALUE              =
    *     ORDER_CFGS_BLOB               =
    *     ORDER_CFGS_VK                 =
    *     ORDER_CFGS_REFINST            =
    *     ORDER_CCARD                   =
    *     ORDER_TEXT                    =
    *     ORDER_KEYS                    =
    *     EXTENSIONIN                   =
    *     PARTNERADDRESSES              =
    *    commit work.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *     EXPORTING
    *       WAIT          =
    *     IMPORTING
    *       RETURN        =
       LOOP AT return INTO wa_return.
         WRITE:/ wa_return-message.
       ENDLOOP.
    ENDFUNCTION.
    *& Include ZSD_SO_CHANGES2_TOP                               Module Pool      ZSD_SO_CHANGES2
    PROGRAM  ZSD_SO_CHANGES2.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ITEM_DATA'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES:   VBAP,kna1.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ITEM_DATA'
    TYPES: BEGIN OF T_ITEM_DATA,
              POSNR LIKE VBAP-POSNR,
              MATNR LIKE VBAP-MATNR,
              KWMENG LIKE VBAP-KWMENG,
              VRKME LIKE VBAP-VRKME,
            END OF T_ITEM_DATA.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ITEM_DATA'
    DATA:     G_ITEM_DATA_ITAB   TYPE T_ITEM_DATA OCCURS 0,
               G_ITEM_DATA_WA     TYPE T_ITEM_DATA. "work area
    DATA:     G_ITEM_DATA_COPIED.           "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ITEM_DATA' ITSELF
    CONTROLS: ITEM_DATA TYPE TABLEVIEW USING SCREEN 4000.
    DATA:GV_NUM TYPE I VALUE 1,
           GV_NUM2 TYPE I.
    DATA:     G_T_YREC_TAB_LINES  LIKE SY-LOOPC.***********top*************
    *& Include ZSD_SO_CHANGES2_TOP                               Module Pool      ZSD_SO_CHANGES2
    PROGRAM  ZSD_SO_CHANGES2.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'ITEM_DATA'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES:   VBAP,kna1.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'ITEM_DATA'
    TYPES: BEGIN OF T_ITEM_DATA,
              POSNR LIKE VBAP-POSNR,
              MATNR LIKE VBAP-MATNR,
              KWMENG LIKE VBAP-KWMENG,
              VRKME LIKE VBAP-VRKME,
            END OF T_ITEM_DATA.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'ITEM_DATA'
    DATA:     G_ITEM_DATA_ITAB   TYPE T_ITEM_DATA OCCURS 0,
               G_ITEM_DATA_WA     TYPE T_ITEM_DATA. "work area
    DATA:     G_ITEM_DATA_COPIED.           "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ITEM_DATA' ITSELF
    CONTROLS: ITEM_DATA TYPE TABLEVIEW USING SCREEN 4000.
    DATA:GV_NUM TYPE I VALUE 1,
           GV_NUM2 TYPE I.
    DATA:     G_T_YREC_TAB_LINES  LIKE SY-LOOPC.
    ************************pbo*******************
    *&  Include           ZSD_SO_CHANGES2_PBO
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ITEM_DATA'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE ITEM_DATA_INIT OUTPUT.
       IF G_ITEM_DATA_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'VBAP'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_ITEM_DATA_itab'
    *    SELECT * FROM VBAP
    *       INTO CORRESPONDING FIELDS
    *       OF TABLE G_ITEM_DATA_ITAB.
    *    G_ITEM_DATA_COPIED = 'X'.
         REFRESH CONTROL 'ITEM_DATA' FROM SCREEN '4000'.
       ENDIF.
       ITEM_DATA-LINES = G_T_YREC_TAB_LINES + 15.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ITEM_DATA'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE ITEM_DATA_MOVE OUTPUT.
       MOVE-CORRESPONDING G_ITEM_DATA_WA TO VBAP.
    ENDMODULE.
    *&      Module  STATUS_4000  OUTPUT
    *       text
    MODULE STATUS_4000 OUTPUT.
       SET PF-STATUS 'APAR'.
    *  REFRESH G_ITEM_DATA_ITAB.
        GV_NUM = 1.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_4000  OUTPUT

  • I deleted my iMovie from computer and from my purchases list in AppStroe. When I'm trying to download it again from App Store a pop up window comes up and says: "These apps were already assigned to your Apple ID and are available in your Purchases list"

    I deleted my iMovie from computer and from my purchases list in AppStroe. When I'm trying to download it again from App Store a pop up window comes up and says: "These apps were already assigned to your Apple ID and are available in your Purchases list". Please help me to reinstall it.

    If new versions of iPhoto and the other iLife applications (iMovie and GarageBand) were purchased by the previous owner from the Mac App Store, then they will be locked to the previous owner's Apple ID and cannot be transferred to you. You will have to re-purchase them under your own Apple ID.
    If this is an older MBA that came with Snow Leopard or an earlier version of Mac OS X, though, the system would have come with an installation disk that included the iLife applications, a disk which the seller should have provided to you. Those iLife applications would be older versions, of course, and may or may not work in Lion depending on how old they are.
    Regards.

  • How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    You can certainly use iWork, though I hesitate to recommend it to a seasoned Windows user simply because it would add another level of the unfamiliar with which you would have to gain familiarity. The iWork applications are certainly very competent and in most respects both easy to use and surprisingly powerful. They are not 100% compatible however, though that typically manifests itself in document formatting issues rather than anything more significant.
    I have never attempted to import emails from a Windows system into MacOS - other than in Outlook connected to an Exchange server, thus not really an issue at all. I doubt that the Mail app in MacOS can import directly, but of course you could always set the account(s) up on the Mac and then forward emails you want to keep from the PC. Not elegant, but it works. Virtually any Windows document or file, whichever application created it, can be opened or converted for use on a Mac, and using both systems on my desk each day I rarely see any issues switching stuff from one machine to the other. You may stumble over one or two issues, but likely not significant.
    In switching platforms there will be some inevitable issues, not so much with being able to import your stuff because there's usually a workaround or a utility that can help, but just with getting familiar with the platform and the differences between Windows and MacOS that can obscure their similarities. From time to time the support community here hears from a user who has found the migration very problematic and regrets it, but for the most part the phrase 'I should have done this years ago...' is rather more prevalent!

  • TS3212 i am trying to download itunes 10.7.  i have windows vista 32-bit.  when i click on download.  the pop up window comes up and ask to save or cancel, and then the webpage says thank you for downloading.  it hasn't downloaded it.  what can i do to fi

    i am trying to download itunes 10.7.  i have windows vista 32-bit.  when i click on download.  the pop up window comes up and ask to save or cancel, and then the webpage says thank you for downloading.  it hasn't downloaded it.  what can i do to fix this?

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • How to run a remote windows dll files and the drivers of the system using j

    Dear Friends,
    I need some valuable info regd how to run a remote windows dll files and the drivers of the system using java
    reply regd thanking you

    Please don't make duplicate posts like this.

  • Window pops up saying can not complete request data base error, disk is full

    Window pops up saying can not complete request data base error, disk is full

    I am using the latest ID version with update and I am using a Mac running 10.9.5. This all started when I tried to make a PDF file from a pub I was working on. The application made the file but went into a spinning beach ball and I had to force quit. Now the window pops up when I open ID and also when I am working on a documents.

  • When opening the App Store a pop up window comes up and will not let me close it even when I touch outside the window

    When opening the App Store a pop up window comes up and will not let me close it even when I touch outside the window

    Close apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen
    http://support.apple.com/kb/ht5137

  • How to achieve the from and to date range in report builder 3.

    I AM TRYING TO CREATE ONE REPORT FROM REPORT BUILDER 3.
    WHERE I AM UNABLE TO DEFINE THE DATE RANGE.
    HOW TO ACHIEVE THE DATE RANGE IN REPORT BUILDER.
    NEED FROM DATE AND TO DATE FILTER IN REPORT BUILDER FOR PK DATE.

    Hi Ganesh,
    According to your description, you create a report in Report Builder 3.0, and create two parameters FromDate and EndDate, now you want to use the parameters in your MDX query, right?
    If in this case, here is a sample query for your reference.
    select
    {[Measures].[Internet Sales Amount]
    } on columns,
    {[Date].[Date].members} on rows
    from(
    select
    STRTOMEMBER("[Date].[Date].&["+@StartDate+"]"):STRTOMEMBER("[Date].[Date].&["+@EndDate+"]")
    ) on columns
    from [Adventure Works]
    Reference:STRTOMEMBER
    Regards,
    Charlie Liao
    TechNet Community Support

  • I have moved my iTunes library to a new Windows 7 PC and cannot transfer music from the new iTunes PC to my iPhone. The iPhone only accepts transfers from the original iTunes PC.

    I have moved my iTunes library to a new Windows 7 PC and cannot transfer music from the new iTunes PC to my iPhone 4S. The iPhone will only accept music transfers from the original iTunes PC. I have come to understand that an iPhone can have only one "daddy" iTunes PC, but have not been able to find out how to change the "daddy". I have done a backup of the iPhone, and a "Restore to Original Settings". Then I restored the content using the new iTunes PC. My Apps and contacts, etc. are back on the iPhone, but it still won't accept music from the new iTunes PC.

    What happens when you try to sync the iphone to the new computer?

  • How do I stop Adobe Bridge, Excel, Word and Adobe Photo Downloader from loading at startup under Mac OS 10.7.1, they are not loaded in login items.

    How do I stop Adobe Bridge, Excel, Word and Adobe Photo Downloader from loading at startup under Mac OS 10.7.1, they are not loaded in login items.

    When you shut down this window appears.
    Uncheck the reopen box and it should stop this from happening

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • Cannot verify server window is open and I am locked from using IPad

    cannot verify server window is open and I am locked from using IPad

    When you say that you rebooted, do you mean like this? Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If thats what you did and it failed, it couldn't hurt to reset your router as well by unplugging it from power for about 30 seconds.
    You can also try Resetting All Settings. Settings>General>Reset>Reset All Settings. That will require you to join the network again and that might trigger the connection again. No data is lost when resting all settings but as the name implies, all device settings will be restored to factory defaults  and you will have to enter your preferred settings again.

  • I have 2 iphones and a macbook on one mobile me account.  How can I keep mail in the macbook and one iphone private from the other iphone?

    I have an iPhone 3G, an iPhone 3GS, and a MacBook on one macmail and mobile me account.  How can I keep mail on the MacBook and iPhone 3 private from the iPhone 3GS?

    Pretty much. I don't understand why you need to worry about MobileMe, though. I'd guess the vast majority of us with iDevices don't have MobileMe accounts at all. That's pretty much why it failed.

  • HT201413 I have restored and updated my ipod from recovery mode however I still have the usb cord and itunes icon on the ipod when it is switched on. How can I get my ipod to work again?

    I have restored and updated my ipod from recovery mode, however I still have the usb cord and itunes icon on the ipod when it is switched on. How can I get my ipod to work again? I have updated and restored 5 times! When connected to itunes it only shows the summary page saying ipod in recovery mode.

    Fixed it!
    1. Made sure itunes software was up to date
    2. Pressed and held 'home' button and 'on-off' button at the same time for about 10 seconds till ipod reset (I hadn't done this step previously)
    3. Connected to itunes
    4. Pressed restore and update ipod
    Update successful and ipod taken out of recovery mode

Maybe you are looking for

  • How do I open a photo and post online?

    Good evening, how do I open a photo and post online if it's Adobe Reader?

  • Modifying the Crosstab Bean appearance in JSP

    Hi, I want to show five crosstabs in a HTML table each in different row. But every crosstab set their rows size independently depending on the actual column heading, so the generated page is very ugly. Is there a way to control the crosstab Bean gene

  • After updating iTunes, my wishlist and list of purchases is no longer visible in the Store.

    Like the title says, after the most recent update of iTunes (11.1.2) on my MacBookPro (OS X 10.6.8) when I go to the store My Wish List is no longer populated with selections that I have made to consider purchasing, and under Purchased it shows that

  • Does Elements support imported closed-captioning?

    Using Elements 2.0.  Ripped a self-produced DVD containing closed captioning on it (line 21); added that media to Elements; the resulting exported MPEG had no closed-captioning on it, or none was detected by the "ccextractor".  Trying to determine if

  • Disk Space of a new 2004s installation

    Hello guys, i want to build up a test system on a linux vmware system (no development system - a test system for us)... So i need to know the disks space that a "empty" installation is using? How many disk space is used in case of a new 2004s install