Func- Code for Radio-button in Module-pool Prg.
Hi Friend's.
I have define 2 Radio button
on Module-pool screen.
I am not been able to triger the Radio button in
Pai .
How can i assign the function code for
radio-button in module-pool.
pls can any one help me
Hi,
For radion buttons, what ever the name you will give that name only will hold that value ( Either selected or not ). But this variable should be declared as global variable in main program.
Still if you want to assign function code, you can assign one like other fields on the screen.
Similar Messages
-
How to create radio button in module pool
Hi All,
Please tell me step by step procedure for creating radio button in module pool.give code for two radiobutton and at a time only one should be selected.
Thanks
NarendraHi naren,
In the layout of screen painter click on radiobutton option in the left icons and create in the layout and give name as Radio1 and again select the radiobutton icon and create another and give the name as radio2 and by dragging the cursor select the 2 radiobuttons and goto menubar->edit->grouping->radiobuttons grouping->define.
Double clcik on the 2 radiobuttons and give FCT code for the coding purpose of the 2 radiobuttons.
Cheers!!
VEnk@ -
How to define RADIO BUTTONS in MODULE POOL PROG.?
Hi Experts,
I need to keep the RADIO BUTTONS in 1000_screen of my_module_pool prog., like,
I hv 2 fields in this screen, as expected, the first shuld hv DEFAULT selection.
So, I just simply, dragged & dropped 2 radio buttons from left menu of the screen builder & given them the names as
R_SUMMARY
R_DETAIL
Then i executed the transaction, but, these above 2 fields are getting selected, as default??
I know that, if its a REPORT prog. we can define as w/ a GROUP, then the 1st one is hv the default selection.
so,
1 - How to define RADIO BUTTONS in this screen of a module pool prog.
2 - How to use these names in the prog.(PAI - i guess)?
thanq
Edited by: Srinivas on Jul 12, 2008 11:59 PMHi Srinivas,
Please check this link
Re: urgent:Regd radio buttons in module pool
http://saplab.blogspot.com/2007/10/sample-abap-program-for-module-pool_18.html
http://****************/Tutorials/ABAP/Checkbox/page1.htm
http://****************/Tutorials/ABAP/Checkbox/page2.htm
Best regards,
raam -
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 -
Issue in using radio button in module pool
For same field I need 2 different search help. Based on radio button on screen I need company codeu2019s from different table. Issue is, at execution radio button remains blank. Radio button works only when I use them in PAI under CASE SY-UCOMM. WHEN u2018DONEu2019. IF Normal_Run = u2018Xu2019u2026u2026
Can I use radio button with the below code. Please refer the below code.
PROCESS ON VALUE-REQUEST.
FIELD COMP_CODE MODULE POPULATE_COMP_CODE.
MODULE POPULATE_COMP_CODE INPUT.
IF REPEAT_RUN = 'X'.
PERFORM COMP_CODE_POPULATE.
ELSEIF NORMAL_RUN = 'X'.
PERFORM COMP_CODE_POPULATE_N.
ENDIF.
ENDMODULE.
FORM COMP_CODE_POPULATE .
SELECT COMP_CODE
FROM ZIFRS_D_PROCESS
INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB_CC
WHERE PROC_NAME = 'DEPRECIATION RUN'.
READ TABLE VALUES_TAB INDEX 1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'COMP_CODE'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'COMP_CODE'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = VALUES_TAB_CC.
ENDFORM. " COMP_CODE_POPULATION
FORM COMP_CODE_POPULATE_N .
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = '/BI0/SCOMP_CODE'
FIELDNAME = 'COMP_CODE'
DYNPPROG = PROGNAME
DYNPNR = DYNNUM
DYNPROFIELD = 'COMP_CODE'.
ENDFORM. " COMP_CODE_POPULATE_N
Moderator Message: Please use "code" tags to format the code snippet.
Edited by: Suhas Saha on Nov 23, 2011 5:13 PMHi
You need to make the Grouping for these Radio button on the screen
Search for how to make Radio buttons grouping
radio buttons in screen painter
http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCDWBTUT/BCDWBTUT.pdf
and search for Radio button Group in this document
assign a Function Code for one of the radio buttons(It allows for only one Radio Button)
This triggers automatic PAI so when you take the F4 Help this is readily available
In TOP include make sure you define the variables corresponding to the Radio buttons on the screen and also provide default value X to one of the Radio buttons
Hope this serves your purpose
Cheerz
Ramchander Rao.K -
In ordinary report programs, if we want to change screen value according to the selection of radion button, we use user command and at user command options.
But how do i do it in module pool programming.
Like in module pool if i select one radio button some input fields should be non edidtable.Hi,
DATA: OK_CODE TYPE SY-UCOMM,
PROCESS_CODE TYPE SY-UCOMM.
<b>In PAI</b>
MODULE USER_COMMAND_0100.
PROCESS_CODE = OK_CODE.
CLEAR OK_CODE.
CASE PROCESS_CODE.
WHEN 'RADIO'. " RADIO is the function code for the radibuttons.
IF R1 = 'X'.
R2 = SPACE.
ELSEIF R2 = 'X'.
R1 = SPACE.
ENDIF.
ENDCASE.
Hope this helps.
Reward if helpful.
Regards,
Sipra -
Creating Radio Button on Module pool Screen
Hi Gurus,
I am currently working on a program which involves module pool selection screen. In my selection screen i have placed 2 radio buttons, i have kept these radio buttons in same group. But when i am running the program both the radio buttons appear as checked. Could any one help me on that.......I need only one radio button to be checked at a time ..
Thanks in advance....
Regards,
Shiv.hI,
IT IS HIGHLY IMPOSSIBLE THAT BOTH OF THE RADIOBUTTONS ARE CHECKED.
and there is no chance that both the radiobuttons are in two different groups since in a single group minimum 2 radiobuttons should be there.
check you coding.or if required redraw the radiobuttons. and select the radiobuttons properly while grouping them together..after grouping you will see dotted lines aroung them.
just try that. reward if helpful.
regards,
pankaj singh -
Radio button in module pool programming
Hello,
Am placing 4 radio button when designing in module pool but at
run time all radio button are getting marked i want only first radio button to be marked and remaining to be with visible but not highlighted plz let me know wht to do in PBO event.Hi,
Goto to screenpainter of that screen .
Drag and select all the Radio Buttons .
Goto Edit>Grouping>Radiobutongroup-->Define.
Now see the Output.
Regards,
Morris Bond.
Reward Points if Helpful. -
Creating Radio Button in Module Pool
Hi All,
I have created a Two radio button on screen 100.
When I run this I will get both radio button selected.
I am unable to group these.
How can I group both?
I am using 4.7. I am not getting Graphical Layout of the screen.
How to group in classical only.Hi Praveen,
Steps to group radiobuttons with alphanumeric editor.
<li>Place the cursor on first radiobutton and click on Graphical element button in the application toolbar.
<li>Now place the cursor on 2nd radiobutton and click on Define graph.group button in the application toolbar.
<li>Now radiobuttons are grouped and first one is defaulted.
Thanks
Venkat.O -
Code for radio button is not working plz help
checkboxes are working fine but when i put radio code submit button does nothing
plz help
thanks in advance
<%@ page language="java" contentType ="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import= "java.sql.*,java.io.*,com.anaghan.MyBeans.CmsConnection"%>
<jsp:useBean id="obj" scope="request" class="com.anaghan.MyBeans.DepartmentBean"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="javascript" >
function cmdOnSelect()
var deptcode=document.DepartmentPage.cmdSelect.value;
DepartmentPage.method="post";
DepartmentPage.action="./vsnlemployee_calldatasheetcallhistory.jsp?flag=select&cmdSelect="+deptcode;
DepartmentPage.submit();
function validate()
var user_etime = document.DepartmentPage.etime.value;
var etime_length = document.DepartmentPage.etime.value.length;
var user_edate = document.DepartmentPage.edate.value;
var edate_length = document.DepartmentPage.edate.value.length;
var user_calltype = document.DepartmentPage.calltype.value;
var calltype_length = document.DepartmentPage.calltype.value.length;
var user_callstatus = document.DepartmentPage.callstatus.value;
var callstatus_length = document.DepartmentPage.callstatus.value.length;
if( edate_length==0 )
alert("Please enter the call date");
return false;
else if( calltype_length==0 )
alert("Please enter the call type");
return false;
else if( callstatus_length==0 )
alert("Please enter the call status");
return false;
else if( etime_length==0 )
alert("Please enter the call timing");
return false;
else if(etime_length!=0 && etime_length!=4)
alert("Entered timing is invalid");
return false;
else if (etime_length!=0)
for (var i = 0; i < etime_length; i++)
valid_characters = new RegExp ("[0-9]", "g");
var part_user_etime = user_etime.charAt (i);
if (!valid_characters.test (part_user_etime))
alert("Special characters like '" + part_user_etime + "' are not allowed in timing" );
return false;
valid_characters = null;
return true;
else
return true;
function cmdOnClick()
if (validate())
DepartmentPage.method="post";
DepartmentPage.action="/anaghan/CallSheet?flag=call";
DepartmentPage.submit()
</script>
<script language="javascript" src="calendar1.js">
</script>
</head>
<body>
<%
String uname=(String)session.getAttribute("employeeName");
if(uname==null)
response.sendRedirect("/Error.jsp?login=Login Session Problem");
%>
<%
String date1="";
String date2="";
%>
<%!
ResultSet rs=null;
Connection con =null;
String conStr="sun.jdbc.odbc.JdbcOdbcDriver";
String tableStr="jdbc:odbc:Anaghan";
%>
<%
String companycode=request.getParameter("cmdSelect");
HttpSession hs = request.getSession();
hs.setAttribute("companycode",companycode);
System.out.println("CALLLLL="+companycode);
%>
<%
String flag="";
String deptcode="";
String commissioningdate="";
String closuredate="";
%>
<%
String a2="";String a1="";
%>
<form name="DepartmentPage" >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0" >
<TR>
<TD align=CENTER>
<h2> CALL DATA SHEET </h2>
</TD>
</TR>
<TR>
<div>
<FONT face="Arial " color=#000000 size=2>
<TD valign="top">
<TABLE cellSpacing=15 cellPadding=0 width="100%" border="0">
<TD width="50%" vAlign="top" align=CENTER height=24 bgcolor=#F8F8F8 >
<tr>
<TD align=RIGHT>Select Company - </TD>
<td><SELECT name="cmdSelect" size="1" onChange="cmdOnSelect();">
<OPTION SELECTED></OPTION>
<%
deptcode=request.getParameter("cmdSelect");
response.setContentType("text/html");
ResultSet rs = obj.onSelect();
while(rs.next())
String tempName=rs.getString(2);
%>
<OPTION id= "a<%=tempName %>" value= "<%=tempName%>"> <%=tempName %></OPTION>
<%}%>
</SELECT></td>
</TR>
</TD>
</TABLE>
<TABLE cellSpacing=15 cellPadding=0 width="100%" border="0">
<TR>
<TD>
<table align="center" width="90%" cellspacing="2" cellpadding="2">
<tr>
<td align="center"><h2>Contact Person</h2></td>
</tr>
</table>
<table align="center" width="90%" border="1" cellspacing="2" cellpadding="2">
<tr><th>Name</th><th>Landline</th><th>Mobile</th><th>Fax</th><th>E-mail</th></tr>
<%!
ResultSet result=null;
%>
<%
response.setContentType("text/html");
try{
Connection con = DriverManager.getConnection("jdbc:odbc:Anaghan");
Statement stmt=con.createStatement();
result =stmt.executeQuery("select * from enquiry_details where companycode='"+deptcode+"' ");
while(result.next())
%>
<tr>
<OL><td align ="center"><%=result.getString(9) %></td>
<td align ="center"><%=result.getString(10) %></td>
<td align ="center"><%=result.getString(11) %></td>
<td align ="center"><%=result.getString(12) %></td>
<td align ="center"><%=result.getString(13) %></td></OL>
<tr>
<OL><td align ="center"><%=result.getString(14) %></td>
<td align ="center"><%=result.getString(15) %></td>
<td align ="center"><%=result.getString(16) %></td>
<td align ="center"><%=result.getString(17) %></td>
<td align ="center"><%=result.getString(18) %></td></OL>
<%}
catch(Exception e)
e.printStackTrace();
}%>
</tr></table>
</TD>
</TR>
<TR>
<TD>
<table align="center" width="90%" cellspacing="2" cellpadding="2">
<tr>
<td align="center"><h2>Call History</h2></td>
</tr>
</table>
<table align="center" width="90%" border="1" cellspacing="2" cellpadding="2">
<tr><th>Call Type</th><th>Call Status</th><th>Service Type</th><th>Feedback</th><th>Next Visit</th><th>Call Date</th></tr>
<%!
ResultSet result1=null;
%>
<%
response.setContentType("text/html");
try{
result1=obj.onSelectCallHistory(deptcode);
while(result1.next())
%>
<tr>
<OL><td align ="center"><%=result1.getString(3) %></td>
<td align ="center"><%=result1.getString(4) %></td>
<td align ="center"><%=result1.getString(6) %></td>
<td align ="center"><%=result1.getString(7) %></td>
<td align ="center"><%=result1.getString(9) %></td>
<td align ="center"><%=result1.getString(8) %></td>
</OL>
<%}}
catch(Exception e)
e.printStackTrace();
}%>
</tr></table>
</TD>
</TR>
<TABLE cellSpacing=15 cellPadding=0 width="100%" border="0">
<TD width="50%" vAlign="top" align=CENTER height=24 bgcolor=#F8F8F8 >
<TR>
<TD></TD>
</TR>
<TR></TR>
<TR>
<TD align=RIGHT>
Type of Call - </TD>
<td>
<input type = radio name=calltype value=personal/>personal
<input type = radio name=calltype value=email/>Email</td>
<!-- <TD><SELECT name="calltype" size="1" >
<OPTION SELECTED></OPTION>
<OPTION id= "s" value= "personal"> Personal </OPTION>
<OPTION id= "s" value= "telephonic"> Telephonic </OPTION>
<OPTION id= "s" value= "email"> E-mail </OPTION>
<OPTION id= "s" value= "meeting"> Meeting </OPTION>
</SELECT>
</TD>-->
</TR>
<TR>
<TD align=RIGHT>
Status of Call - </TD>
<TD>
<SELECT name="callstatus" size="1" >
<OPTION SELECTED></OPTION>
<OPTION id= "s" value= "cold"> Cold </OPTION>
<OPTION id= "s" value= "warm"> Warm </OPTION>
<OPTION id= "s" value= "hot"> Hot </OPTION>
<OPTION id= "s" value= "closed"> Connection Executed </OPTION>
<OPTION id= "s" value= "upgrade"> Upgrade </OPTION>
<OPTION id= "s" value= "downgrade"> Downgrade </OPTION>
<OPTION id= "s" value= "shiftingoflocation"> Shifting of Location </OPTION>
<OPTION id= "s" value= "connectionterminated"> Connection Terminated </OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD align=RIGHT>Date - </TD>
<TD><input type="text" readonly name="edate" id="edate" size="10" value="<%=date1 %>">
<img src="./cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date">
</TD>
</TR>
<TR>
<TD align=RIGHT>
Time - </TD>
<TD><input type="text" size="4" name="etime" maxlength="4"></TD>
</TR>
<TR>
<TD align=RIGHT>
</TD>
<TD>(Write timing in 0000 - 2400 in this format only)</TD>
</TR>
<TR><TD align=CENTER> INFRASTRUCTURE DETAILS
</TD></TR>
<TR></TR>
<TR>
<TD align=RIGHT bgcolor=#00CCFF>
<font color="#CC6600" size=4>Details of service </font></TD>
<TD></TD>
</TR>
<TR>
<TD align=RIGHT>
Circuit Specification - </TD>
<TD><SELECT name="servicetype" size="1" >
<OPTION SELECTED>---Services---</OPTION>
<OPTION id= "s" value= "IPLC"> IPLC </OPTION>
<OPTION id= "s" value= "VPN"> VPN </OPTION>
<OPTION id= "s" value= "ILL"> ILL </OPTION>
<OPTION id= "s" value= "VoIP"> VoIP </OPTION>
<OPTION id= "s" value= "ISDN"> ISDN </OPTION>
<OPTION id= "s" value= "IDC"> IDC </OPTION>
<OPTION id= "s" value= "V-IPLC"> V-IPLC </OPTION>
<OPTION id= "s" value= "contactcenter"> Contact Center </OPTION>
</SELECT>
</TD>
</TR>
<TR>
<TD align=RIGHT vAlign=TOP>
Feedback Details - </TD>
<TD><TEXTAREA wrap="virtual" name="feedback" rows=5 cols=30 MAXLENGTH=100></TEXTAREA></TD>
</TR>
<TR>
<TD align=RIGHT>Next Visit Scheduled - </TD>
<TD><input type="text" readonly name="nextvisit" id="nextvisit" size="10" value="<%=date2 %>">
<img src="./cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date">
</TD>
</TR>
<TR></TR>
<TR>
<TD></TD>
<TD>
<input type="button" name="bill" value="SUBMIT" onClick="cmdOnClick();">
<input type="reset" name="reset" value="RESET" >
</TD>
</TR>
</FONT>
</div>
</TD>
</TR>
</TABLE>
</TD>
<TD vAlign=TOP bgcolor=#FFFFFF>
</TD>
</TR></TABLE>
</form>
<script language="JavaScript">
var cal1 = new calendar1(document.forms['DepartmentPage'].elements['edate']);
var cal2 = new calendar1(document.forms['DepartmentPage'].elements['nextvisit']);
</script>
<script language="javascript">
document.getElementById('a<%=request.getParameter("cmdSelect")%>').selected=true;
</script>
<BR><BR>
<jsp:include page="index-end.jsp"/>
</body>
</html>If the reset doesn't work, you have to force iPad into Recovery Mode
1. Turn off iPad
2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
3. Plug USB cable into computer's USB port
4. Hold Home button down and plug the other end of cable into docking port.
DO NOT RELEASE BUTTON until you see picture of iTunes and plug
5. Release Home button.
ON COMPUTER
6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
7. Select "Restore iPad"...
Note:
1. Data will be lost if you do not have backup
2. You must follow step 1 to step 4 VERY CLOSELY.
3. Repeat the process if necessary. -
Assigning a function code to radio button in 4.5B
Ive a requirement wherein I need to trigger the PAI event in a module pool program when I select a particular radiobutton in a group and do some processing subsequently.
For this I need to assign a function code to the radiobutton group.
But the function code field is disabled for input in the properties screen of the layout. Our client system is SAP 4.5B.
I am able to assign function codes to radio button groups in esuides(4.6C) and other systems.
I want to know whether we can assign a function code at all to a radio button group in version 4.5B.
If so, please tell me how to do this.
With regards,
ramu.Hi,
we can't assign function codes to radio buttons.
for assigning some code to radio button.check the radio button status.
in PAI.
if RAD1 = 'X'.
xxxxxxxxxxx.
xxxxxxxxx.
elseif RAD2 = 'X'.
xxxxxxxxx.
xxxxxxxxxxxx.
endif.
regards,
bharat. -
Navigation problem with back button in module pool
Hi everyone,
I have a scenario in module pool programming in which i need help.
I have an i/p filepath screen where the user inputs his/her file and clicks on validate button provided in the toolbar.
After that it goes to the next screen which displays all the messages(error/success).
After I click on Execution button it goes to next screen displaying all the created data.
Now when I click on back button I want it to go to the i/o filepath screen.
Please give me your comments on this.
Leave to screen XXXX is giving me dump so any other options plz let me know.
Thanks in advance.Hi Amit,
Lets say you have 3 screens 100, 200 and 300. screen 100 has you input file path and 200 shows the message and 300 shows the created data.
Now in PAI of 300 write as below.
IN the screen as below
MODULE USER_COMMAND_300_EXIT AT EXIT COMMAND.
In the include as below
MODULE USER_COMMAND_300_EXIT.
CASE sy-ucomm.
WHEN 'BACK'. " OK code for BACK button.
CALL SCREEN 100.
WHEN 'CANCEl'.
LEAVE TO SCREEN 0
ENDCASE.
ENDMODULE.
Please revert if you still face problems.
Regards,
Praveenkumar T -
Sort up and sort Down push buttons in module pool with table control wizard
hi,
i have created 2 buttons for Sort up and sort Down push buttons in module pool with table control wizard
please any one can help me.
regardsHi
Following code is to enable and disable the tbl control using two buttons. Just alter the code and for each button write the sort code.
REPORT YJAN27_SCREEN .
TABLES: SFLIGHT, YFLIGHT_28.
TYPES: BEGIN OF struct1,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate,
END OF struct1.
CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2700.
DATA: OK_CODE LIKE SY-UCOMM,
CARRID LIKE SFLIGHT-CARRID, "cols in tbl ctrl
CONNID LIKE SFLIGHT-CONNID,
FLDATE LIKE SFLIGHT-FLDATE,
itab TYPE TABLE OF STRUCT1 WITH HEADER LINE,
cols like line of TBL1-COLS,
FLAG TYPE I.
FLAG = 1.
CALL SCREEN 2700.
*& Module STATUS_2700 OUTPUT
* text
MODULE STATUS_2700 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_2700 OUTPUT
*& Module USER_COMMAND_2700 INPUT
* text
MODULE USER_COMMAND_2700 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'DIS'. "write code for sort up
loop AT TBL1-COLS INTO COLS.
COLS-SCREEN-INPUT = 0.
MODIFY TBL1-COLS FROM COLS.
ENDLOOP.
FLAG = 2.
WHEN 'ENA'. "write code for sort down
loop AT TBL1-COLS INTO COLS.
COLS-SCREEN-INPUT = 1.
MODIFY TBL1-COLS FROM COLS.
ENDLOOP.
FLAG = 1.
ENDCASE.
ENDMODULE. " USER_COMMAND_2700 INPUT
*& Module GET_DATA OUTPUT
* text
MODULE GET_DATA OUTPUT.
select carrid connid fldate from SFLIGHT into table itab.
ENDMODULE. " GET_DATA OUTPUT
*& Module POPULATE_TBL OUTPUT
* text
MODULE POPULATE_TBL OUTPUT.
MOVE-CORRESPONDING ITAB TO SFLIGHT.
ENDMODULE. " POPULATE_TBL OUTPUT
*& Module CHANGE_SCREEN OUTPUT
* text
MODULE CHANGE_SCREEN OUTPUT. " use this module if you want to hide the other button
CASE FLAG.
WHEN 1.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B_ENA'.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B_DIS'.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
WHEN 2.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B_DIS'.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B_ENA'.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDCASE.
ENDMODULE. " CHANGE_SCREEN OUTPUT
PROCESS BEFORE OUTPUT.
MODULE STATUS_2700.
MODULE CHANGE_SCREEN. " use this if you want to display one button at a time
MODULE GET_DATA.
loop at itab WITH control TBL1.
MODULE POPULATE_TBL. " populate tbl ctrl
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_2700. " do the sort operations
loop at itab.
endloop.
Hope this helps
Regards,
Jayanthi.K -
Why not autoskip for radio buttons? and the update_allowed FALSE issue
I would so dearly love there to be autoskip for radio buttons. (forms 11.1.1.4 jre 6...24) There is no autoskip property for the radio group nor for the individual buttons.
I don't find an easy way to emulate it either. Or am I missing something?
Anyone else solve this problem already? When the user selects a radio choice I want the focus to move
to the next enabled item on the form. You can do this with text items but not with radio groups. (In some cases the radio group has a when-radio-changed trigger
that enables/disables following items). This would all be a lot easier if radio groups just had autoskip. I wonder why they don't?
BTW the following has cost me a huge amount of time. In 6i it was the case in my experience that if you
disabled an item like this:
PROCEDURE disable_item (myitem in varchar2) IS
BEGIN
copy(null,myitem);
set_item_property(myitem,enabled,property_false);
set_item_property(myitem,visual_attribute,'DISABLED');
END;Then that could be reversed as so (the weird thing was you had to set navigable also despite not
having changed it yourself.
PROCEDURE enable_item (myitem in varchar2) IS
BEGIN
set_item_property(myitem,enabled,property_true);
set_item_property(myitem,navigable,property_true);
set_item_property(myitem,visual_attribute,'ENABLED');
END;But in 11.1.1.4 I had lots of trouble with Lov's not rising after the item had been disabled and then
re-enabled. No error message. Just didn't do it. Eventually I figured out that what happens is that
after disabling an item the item as also non-updateable. This was not the case in 6i. So then
the enable item code has to be something like this: [Note despite that not update_allowed it did not
automatically grey out the item firefox 3.6.17 and it still has to be done programmatically.]
PROCEDURE enable_item (myitem in varchar2) IS
BEGIN
set_item_property(myitem,enabled,property_true);
set_item_property(myitem,navigable,property_true);
set_item_property(myitem,visual_attribute,'ENABLED');
set_item_property(myitem,update_allowed,property_true);
END;Well right now 11.1.1.4 for autoskip for radio buttons this seems to be working ok. Crossing my fingers!
a block level when-radio-changed trigger with after scope (where item level when-radio-changed triggers
have before scope) with a simple next_item in there.
Where I was having problems before was next_item-ing onto disabled items. There was some kind of issue
with lov's. I'm having less trouble raising the lov programmatically. but also I had the problem that
items were getting set non-update_allowed without my realization.
when new item instance:
declare
currfield varchar2(70) := null;
begin
currfield := :system.trigger_field;
if (get_item_property(currfield,UPDATE_ALLOWED) = 'TRUE')
and (get_item_property(currfield,UPDATE_PERMISSION) = 'TRUE') then
list_values;
else
mess(currfield || ' UPDATE not allowed');
end if;
end;(mess is my program to display alerts.) -
How to get calender in f4 help for select options in module pool (URGENT)
Hi All,
how to get calender in f4 help for select options in module pool
Please help .
Thanx in advance,
amrutaHi Amruta,
First of all, you can not create select-options directly in module pool.
For creating <b>select-option is dialog prog</b> follow these steps:
1. create your selection screen model as subscreen by:
SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
PARAMETRS: P_MATNR LIKE MARA-MATNR.
SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
SELECTION-SCREEN END OF SCREEN 2000.
2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
3. write this bit of code in PBO and PAI of the screen 100;
CALL SUBSCREEN SUBSCREEN_2000.
4. include this code in PBO:
INCLUDING SY-REPID '2000'
6. write user_command of PAI, call screen which is going to executable after selection-screen.
5. create a transcation for this dialog module pool with screen 100.
6. execute this transaction and you can see it's behaving like cool with select-options.
After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
Hope it will solve the problem.
Regards
Krishnendu
Maybe you are looking for
-
Photoshop CS6 Lag in windows 8
Hello, I did a search in the forum, but couldn't find something specific to windows 8. When photoshop CS6 was released. I took it for a spin on windows 7. Everything worked perfectly. Then my school offered it at a reduced price and we got a free ver
-
Adobe reader XI isnt working it wont open or open PDF files. I have tryed to fix it in the control panel and I have uninstalled and reinstalled it several times and it still isn't working. Anyone know what to do to fix this?
-
Can't find the Mavericks upgrade download
I have a MacBook5,2 Core 2 Duo (4 gb RAM) that's currently running Snow Leopard 10.6.8. I want to download/install the Mavericks upgrade, but the links to Maverick are gone -- they go to the Yosemite download page. Is there any way to find/download/i
-
Track pad not functioning correctly
My MacBook 5,1 is having issues with the track pad. Clicking on a folder to open and scrolling are fine. Even a feather like click works, so sensitivity is still functional. Click and drag and what Apples called secondary click to get drop down menus
-
hi, We have the following problem: We created new aggreements in Jan, but used the worng field in the access sequences for one of the condition tables. we have since corrected that, but is there any way sfter the change has occured that we could get