Pop up in module pool
Hi forum,
My requirement is whenever i change entry which is greater than 1000 in table control i should get a pop up message 'wrong entry'.
Pls help me. its very urgent...
regards
mallika
Hi
U need to eraise an error message into the loop of PAI
PROCESS PAI.
LOOP AT ITAB.
FIELD ITAB-FIELD1 MODULE CHECK_VALUE.
ENDLOOP.
MODULE CHECK_VALUE.
IF ITAB-FIELD1 > 1000.
MESSAGE E208(00) WITH 'Value is wrong'.
ENDIF.
ENDMODULE.
Max
Similar Messages
-
I created a module pool program for inserting/changing/deleting a database record through a table control on a screen. Now everything is working fine. When I executed that module pool program by a transaction (there is only one screen in this program which has table control on it), I would like that screen to come-up as a pop-up which I am not able to figure how to do it. Any ideas?
Help is appreciated.
Thanks in advancein se51 create the screen , and check the radio button Dialog box. and place alll the components...and then save /activate it.
now in your program call the screen like this..
call screen 200 starting at 1 5
ending at 30 20.
regards
vijay -
To get a pop up screen in Module pool
Hi,
Can any one tell me how to get a pop up screen while clicking a button in selection screen in module pool program.
regards,
Ruchika sainiHi Ruchika,
This is the function module used in the program .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Question'
text_question = 'Want delete records old table'
text_button_1 = 'YES'
text_button_2 = 'NO'
display_cancel_button = ' '
start_column = 25
start_row = 6
IMPORTING
answer = answer.
Regards,
Nihar Swain. -
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 -
Regarding selection-screen in module pool
hi
experts,
i am having doubt in module pool programing...
i want create selection screen(pop screen with field) in modulepool., before the display screeen deatils
ex : if i want display the record details for that particular
record number.......
while i am click on display..
pop-up-selection screen will come with record number field..
i f enter the record no, display s the details...
AnanandPlease see Rich's answer here:
[Dialog programming - How to place a select-option field in a dialog screen;
Rob -
How to give ** bydefault in password in module pool screen .
Hi experts
how to give ******* by default in password in module pool screen .
ThanksHi ,
Double click on the field u will get a pop up window
i.e. attribute window for that field.
in that window you have a tab called Program at the bottom.
in program tab you have many checkboxes.
check the check box with name *Entry.
and activate.
what ever you enter now will be in password formate
Regards
Ajay -
Module pool domain text display info req?
hi
i had an req to show a filed MATNR on a screen in module pool pgm,there shd be a i/p filed for material,user can select the material from the list of available materials,along with the test to be displayed for the filed next to material nos.
the list of mateiral is based on the login user name.
i am able to display the material list,but text is not coming.
pls tell me how to show the text next to matnr no. in list.
i had used the code:
loop at itab_carrid.
clear:text.
CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'
EXPORTING
E_TABLE = 'MARA'
E_FIELD = 'MATNR'
E_VALUE = itab_carrid-matnr
IMPORTING
I_TEXT = text
EXCEPTIONS
ILLEGAL_INPUT = 1
DOMAIN_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
move text to itab_carrid-text1.
modify itab_carrid transporting text1.
endloop.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.hi
tell me,if i made a i/p field on screen from the data variable declared in my program
like :data:actvt(3) type c.
than on layout of screen:I/P filed-actvt.
now i want to provide the f4 to this.i had written the POV for the filed,the data is there in itab,but not poping out.
code:PROCESS ON VALUE-REQUEST.
FIELD ACTVT MODULE create_dropdown_box.
TYPES: BEGIN OF type_carrid,
actvt(3) type c,
text1(40) type c,
END OF type_carrid.
DATA: itab_carrid type Type_carrid occurs 0 with header line.
itab_carrid-actvt = '001'.
append itab_carrid.
itab_carrid-actvt = '002'.
append itab_carrid.
itab_carrid-actvt = '003'.
append itab_carrid.
itab_carrid-actvt = '004'.
append itab_carrid.
itab_carrid-actvt = '005'.
append itab_carrid.
itab_carrid-actvt = '006'.
append itab_carrid.
itab_carrid-actvt = '007'.
append itab_carrid.
endif.
clear:itab_carrid.
loop at itab_carrid.
clear:text.
CALL FUNCTION 'ADS2KIPBRO_GET_DOMAIN_TEXT'
EXPORTING
E_TABLE = 'YLOGON1'
E_FIELD = 'ACTVT'
E_VALUE = itab_carrid-actvt
IMPORTING
I_TEXT = text
EXCEPTIONS
ILLEGAL_INPUT = 1
DOMAIN_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
move text to itab_carrid-text1.
modify itab_carrid transporting actvt text1.
endloop.
clear:itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ACTVT'
DYNPNR = SY-DYNNR
DYNPPROG = SY-REPID
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
plz tell me how to pop out this help in screen. -
Search help for screen fields in module pool
Hi All,
I have a screen in Module pool which has 3 input fields, each input field is attached to the same search help.
These fields are from ztable . I have created a search help USING these 3 fields. All the 3 fields are marked for IMPORT and EXPORT.
So whenever i click F4 on any of the above 3 fields, It will display search help popup and returns some rows...But the values are transfered back only for 1 fields ..i.e for the first field only .
I want that ...as soon as i select any of the row from Search hit list..all the 3 columns should get populated with corresponding fields from that row.
I require it this way as user wants to select based on * selection.Ex: as then every this related to that should be popped up.
Pls help ASAP
Thanks,This is how i got.
data:l_shlp type SHLP_DESCR,
l_rc type sy-subrc,
w_DDSHRETVAL type DDSHRETVAL ,
ls_shintf LIKE LINE OF l_shlp-interface,
t_DDSHRETVAL type TABLE OF DDSHRETVAL.
DATA: dyname LIKE d020s-prog,
dynumb LIKE d020s-dnum.
DATA: BEGIN OF dynpfields OCCURS 3.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynpfields.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
SHLPNAME = 'YTESTDMSSB'
SHLPTYPE = 'SH'
IMPORTING
SHLP = l_shlp .
ls_shintf-valfield = 'X'.
MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
WHERE shlpfield = 'SNNTX'.
MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
WHERE shlpfield = 'SBRTX'.
MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
WHERE shlpfield = 'SBSTX'.
MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
WHERE shlpfield = 'ENPTX'.
MODIFY l_shlp-interface FROM ls_shintf TRANSPORTING valfield
WHERE shlpfield = 'PLANT_CODE'.
CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
EXPORTING
SHLP = l_shlp
DISPONLY = ' '
MAXRECORDS = 500
MULTISEL = 'X'
CUCOL = SY-CUCOL
CUROW = SY-CUROW
IMPORTING
RC = l_rc
TABLES
RETURN_VALUES = t_DDSHRETVAL
IF l_rc = 0.
LOOP AT t_DDSHRETVAL INTO w_DDSHRETVAL.
CASE w_DDSHRETVAL-fieldname.
WHEN 'SNNTX'. "W_SNNTX = w_DDSHRETVAL-fieldval.
dyname = sy-repid.
dynumb = sy-dynnr.
dynpfields-fieldname = 'W_SNNTX'.
dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
APPEND dynpfields.
WHEN 'SBRTX'. "W_SBRTX = w_DDSHRETVAL-fieldval.
dyname = sy-repid.
dynumb = sy-dynnr.
dynpfields-fieldname = 'W_SBRTX'.
dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
APPEND dynpfields.
WHEN 'SBSTX'. "W_SBSTX = w_DDSHRETVAL-fieldval.
dyname = sy-repid.
dynumb = sy-dynnr.
dynpfields-fieldname = 'W_SBSTX'.
dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
APPEND dynpfields.
WHEN 'ENPTX'. "W_ENPTX = w_DDSHRETVAL-fieldval.
dyname = sy-repid.
dynumb = sy-dynnr.
dynpfields-fieldname = 'W_ENPTX'.
dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
APPEND dynpfields.
WHEN 'PLANT_CODE'. "W_ENPTX = w_DDSHRETVAL-fieldval.
dyname = sy-repid.
dynumb = sy-dynnr.
dynpfields-fieldname = 'W_WERKS'.
dynpfields-fieldvalue = w_DDSHRETVAL-fieldval.
APPEND dynpfields.
ENDCASE.
ENDLOOP.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = dyname
dynumb = dynumb
TABLES
dynpfields = dynpfields.
ENDIF. -
How to create a top include for module pool program
hi all..
I want to add my global declarations in one top inlcude.. There are so many other includes in my pgm. But how can i create top include explicitly. Also I have one normal report pgm attached with this module pool.hi Cynthia ,
there are two ways of creating a top include at your situation ,
1) Insert an include <Prog name >TOP in your mpool program and cut n paste your declarations there .. check if this works ...
2)else .. create another m pool program in SE80 , while creating a pop up will ask for with TOP include ... check mark that and then proceed ..
anything of these two will work ...
Reward if helpful !!
Regards,
Ranjita -
Strange problem in module pool programming
Hi all,
we have a module pool program which consists of screen 100 and 200 and 3 sub-screens 201,202 and 203.the problem is when we double click on any field we get a pop up message which should appear only when we press the 'SAVE' button for which ok_code is 'CHNG'.I have debugged the program for screen 100 pbo,pai,200 pbo but the value of ok_code is not equal to 'CHNG' then it takes me to screen 200 and when i double click then popup appears and and in 200 PAI the value of ok_code had already got changed to 'CHNG' without entering the change logic and I have not even pressed the SAVE button which has 'CHNG' code associated with it.Can any one help me solve this problem.I wish I could give a better explanation.
Thanks and Regards,
SangramHi,
This is because the Shortcut key assigned to SAVE button in PF-STATUS is "F2". F2 is for Double Click. Assign some other Function Key to SAVE or any Button. Try to avoid assigning F2 key.
This would solve the problem.
Best regards,
Prashant
PS : Please reward all helpful answers ! -
Hi,
Im very new to module pool
i have one requirement . that is i want to write the functionality for follwoing keys.
1.newentry
2.copy
3.delete.
as per spec i want the following logic
PBO Logic
Create PF status in the PBO and create Application toll bar buttons for New Entry, Copy and Delete.
PAI Logic
Code logic for New Entry, Copy and Delete Entries.
During SAVE.
For actions New Entry and Copy : Check for already existing entry and raise message.
Enqueue the table for update creating a lock object .
When Successfully saved dequeue the table and display u2018Entry Saved u201C message.
Thanks,
Narasimha
Moderator message: "spec dumping", please work yourself first on your requirement, get some training if you're new to the area, SCN cannot be a substitute for this.
locked by: Thomas Zloch on Aug 11, 2010 3:39 PMYou should be able to run it from SE38, you don't need a transaction code in this case, as there is a call screen 100 in there.
How did you copy the program? In SE38, enter the program name and press copy. It should give you a pop-up screen with a bunch of checkboxes. Select all of them and press copy again. That should copy all the objects to your Z program. You then need to activate all of them. In SE38, enter your Z program name and activate. It will give another pop-up with object and obj. name columns. Select all of them again and then press activate.
Hope this helps,
Srinivas -
Module pool to maintiane table ztavble
hi
can anyone send me complete code to refer for maintaining a ztable
following validation are required like
1) sortiing
deletein and addition save etc all as in table maintianece i need to code by module pool becasue in table maintainece sorting coding is not possible...
also validation are
1) whne user enters ship to info name 1 should automatically be populated from kna1 on pressing enter how to acheive this by module pool
2) email verification format should be correct? how to acheive this by module pool
3) sorting on basis of all fields
regards
NishantHi Nishanth,,,
I also developed the same kind of Program for maintaining the Ztable...
Jus create a new GUI Staus...with the required functions....
Refer the below code:
REPORT : Z0BRAP_TAX_EXCEPTION .
TITLE : Tax Exceptions Table
AUTHOR : Swaminathan PJ
DATE : 04/12/2006
DDN NUMBER : SAP-BR-TB0020
TRANSPORT REQUEST NUMBER : D12K912309
REFERENCE :
DESCRIPTION
Program Z0BRAP_TAX_EXCEPTION is an Report program to update the table
ZTBRAP_TAX_EXCPT,here user can Create/Change/Display the table entrie
s and can perform the following functions (Filter,Sort,Summation and
Subtotal).
AMENDMENTS
CHANGES REF DATE PERSON Tran.Req. Number
DESCRIPTION:
Include for Global Declarations *
INCLUDE: znbrap_tax_exception_top. " Include for Global Declarative elements
Include
All the subroutines are include
INCLUDE znbrap_tax_exception. " Include for all Subroutines
START OF SELECTION
START-OF-SELECTION.
Main Subroutine
PERFORM procMain.
End of Selection *
END-OF-SELECTION.
INCLUDE : ZNBRAP_TAX_EXCEPTION_TOP
TITLE : Data Declarations
AUTHOR :
DATE : 04.12.2006
TRANSPORT REQUEST NUMBER : D12K912309
DESCRIPTION
Global Data Declarations for Z0BRAP_TAX_EXCEPTION
AMENDMENTS
CHANGES REF DATE PERSON Tran.Req. Number
DESCRIPTION:
ALV Declarations
TYPE-POOLS: slis.
Types contains the structure of the table
*TYPES : BEGIN OF gy_tax_exception.
INCLUDE STRUCTURE ztbrap_tax_excpt.
mandt TYPE mandt,
zmonat TYPE monat,
zbukrs TYPE bukrs,
zlifnr TYPE lifnr,
zexctype TYPE zebrap_exctype,
zstcd1 TYPE stcd1,
zaugdt_other TYPE budat,
zbelnr TYPE belnr,
zdmbtr TYPE dmbtr,
zwhtinssca TYPE dmbtr,
zuserch TYPE syuname,
zdate_change TYPE datum,
ztime_change TYPE uzeit,
*TYPES: END OF gy_tax_exception.
Tables for the structure defined above
*TYPES : gy_tax_exception_tab TYPE STANDARD TABLE OF gy_tax_exception.
Internal Table
DATA: gt_tax_excpt_tab TYPE STANDARD TABLE OF ztbrap_tax_excpt WITH HEADER LINE, "Global internal table for Tax exceptions data
gt_fieldcat TYPE slis_fieldcat_alv OCCURS 0 WITH HEADER LINE. "Global internal table for fieldcat
*& Include ZNBRAP_TAX_EXCEPTION *
*& Form procMain
text
--> p1 text
<-- p2 text
FORM procMain .
Set PF-Status
perform procInitialize.
Select Tax Exceptions Data
perform procGetTaxExceptionsData.
Display ALV Report with Tax Exceptions Data
perform procDisplayTaxExceptionsData.
ENDFORM. " procMain
FORM initialize *
form procInitialize.
CONSTANTS :
lc_pfstatus TYPE abnkr VALUE 'ZTAX_EXCEPTION'. "Pf Status
Set status
set pf-status lc_pfstatus.
endform. "procInitialize
FORM retrieve_data *
Retrieve data from SAP *
form procGetTaxExceptionsData.
REFRESH: gt_tax_excpt_tab.
select * from ztbrap_tax_excpt
appending corresponding fields of table gt_tax_excpt_tab.
endform. "procGetTaxExceptionsData
Called by REUSE_ALV_GRID_DISPLAY when user interacts. *
In this case, there are a number of buttons / menu options for *
user to select for non-standard functions: *
o Single Display *
o Single Change *
o Single create *
o Single Delete *
--> lv_ucomm *
--> LW_SELFIELD *
form user_command using lv_ucomm like sy-ucomm
lw_selfield type slis_selfield.
Work area
DATA: lw_update_tax_excpt TYPE ztbrap_tax_excpt. " work area for tax exceptions data
DATA: lw_tax_exception TYPE ztbrap_tax_excpt. " work area for tax exceptions data
Variables
DATA: lv_key TYPE abkrs , "key fields
lv_non_key TYPE abkrs, "Non Key Fields
lv_insert TYPE ablnv, "Insert
lv_change TYPE ablnv, "Change
lv_entry TYPE ablnv, "Popup title
lv_display TYPE ablnv, "Display
lv_delete TYPE ablnv, "Delete
lv_mode TYPE ablnv . "Menu options
Constants
CONSTANTS:
lc_new TYPE alind VALUE 'ZNEW', "Fcode for new
lc_update TYPE alind VALUE 'ZBR', "Fcode for change
lc_view TYPE alind VALUE 'ZDISP', "Fcode for display
lc_delete TYPE alind VALUE 'ZDEL ', "Fcode for delete
lc_show_field TYPE abkrs VALUE '00', "Show field
lc_hide_field TYPE abkrs VALUE '02'. "Hide field
Clear Local Work Area
CLEAR :
lw_update_tax_excpt.
Clear Local Variables
CLEAR :
lv_key,
lv_non_key,
lv_mode,
lv_insert,
lv_delete,
lv_change,
lv_display.
Retrieve data for selected line & store it in a temp structure.
READ TABLE gt_tax_excpt_tab index lw_selfield-tabindex .
if sy-subrc is not initial and lv_ucomm <> lc_new and lv_ucomm(6) <> 'DELETE'.
message w123(m&). " Position the cursor on a valid line
exit.
endif.
Moving the contents to workarea
MOVE gt_tax_excpt_tab-zmonat TO lw_update_tax_excpt-zmonat.
MOVE gt_tax_excpt_tab-zbukrs TO lw_update_tax_excpt-zbukrs.
MOVE gt_tax_excpt_tab-zlifnr to lw_update_tax_excpt-zlifnr.
MOVE gt_tax_excpt_tab-zexctype to lw_update_tax_excpt-zexctype.
MOVE gt_tax_excpt_tab-zstcd1 to lw_update_tax_excpt-zstcd1.
MOVE gt_tax_excpt_tab-zaugdt_other to lw_update_tax_excpt-zaugdt_other.
MOVE gt_tax_excpt_tab-zbelnr to lw_update_tax_excpt-zbelnr.
MOVE gt_tax_excpt_tab-zdmbtr to lw_update_tax_excpt-zdmbtr.
MOVE gt_tax_excpt_tab-zwhtinssca to lw_update_tax_excpt-zwhtinssca.
MOVE gt_tax_excpt_tab-zuserch to lw_update_tax_excpt-zuserch.
MOVE gt_tax_excpt_tab-zdate_change to lw_update_tax_excpt-zdate_change.
MOVE gt_tax_excpt_tab-ztime_change to lw_update_tax_excpt-ztime_change.
Move the text for Add,Change,Display
Move text-019 To lv_insert.
Move text-020 To lv_change.
Move text-021 To lv_display.
Move text-023 To lv_delete.
Now see which button / menu option user has selected
case lv_ucomm.
when lc_view. "Display a single entry
lv_mode = lv_display.
lv_key = lc_hide_field. "hide key fields
lv_non_key = lc_hide_field. "hide non key fields
perform procFindKeyFields
using lw_update_tax_excpt lv_mode lv_insert lv_delete
lv_change lv_display lv_key lv_non_key lw_selfield.
when lc_update . "Update a single entry (show non-key fields)
lv_mode = lv_change.
lv_key = lc_hide_field. "hide key fields
lv_non_key = lc_show_field. "show non-key fields
perform procFindKeyFields
using lw_update_tax_excpt lv_mode lv_insert lv_delete
lv_change lv_display lv_key lv_non_key lw_selfield.
when lc_new. "Add a single new entry (show all fields)
lv_mode = lv_insert.
lv_key = lc_show_field.
lv_non_key = lc_show_field.
clear lw_update_tax_excpt. "Empty structure to give new entry.
perform procFindKeyFields
using lw_update_tax_excpt lv_mode lv_insert lv_delete
lv_change lv_display lv_key lv_non_key lw_selfield.
WHEN lc_delete. " Delete current entry
lv_mode = lv_delete.
lv_key = lc_hide_field.
lv_non_key = lc_hide_field.
perform procFindKeyFields
using lw_update_tax_excpt lv_mode lv_insert lv_delete
lv_change lv_display lv_key lv_non_key lw_selfield.
endcase.
endform. "user_command
FORM procFindKeyFields *
--> lw_tax_excpt *
--> lw_update_tax_excpt *
--> lv_ret *
form procFindKeyFields using lw_update_tax_excpt structure ztbrap_tax_excpt
lv_mode
lv_insert
lv_delete
lv_change
lv_display
lv_key
lv_non_key
lw_selfield type slis_selfield.
Work area
DATA:lw_key_table TYPE dfies occurs 0 with header line, "Work area for for key fields
lw_tax_excpt TYPE sval occurs 0 with header line. "Work area for tax exceptions data
Variables
DATA: lv_ret TYPE char1, "Return parameter
lv_title TYPE text60, "Popup title
lv_excpt_type TYPE ZEBRAP_EXCTYPE, "Exception type
lv_entry TYPE ablnv, "Popup text
lv_vendor TYPE lifnr, "Vendor
lv_vendor_no TYPE lifnr, "Vendor
lv_co_code TYPE bukrs, "Company code
lv_comp_code TYPE bukrs, "Company code
lv_answer TYPE aavis. "Return parameter
Constants
CONSTANTS:
lc_ref_tab TYPE ablnv VALUE 'T001', "Reference table
lc_ref_fld TYPE ablnv VALUE 'WAERS', "Reference field
lc_hide_fld TYPE abkrs VALUE '04', "Hide field
lc_client TYPE amert VALUE 'MANDT', "Client
lc_user TYPE amert VALUE 'ZUSERCH', "User
lc_date TYPE amert VALUE 'ZDATE_CHANGE', "Date
lc_time TYPE amert VALUE 'ZTIME_CHANGE', "Time
lc_taxno TYPE amert VALUE 'ZSTCD1', "Tax Number
lc_vendor TYPE amert VALUE 'ZLIFNR', "Vendor
lc_exception_typ TYPE amert VALUE 'ZEXCTYPE', "Exception type
lc_clearing_dt TYPE amert VALUE 'ZAUGDT_OTHER', "Clearing date
lc_period TYPE amert VALUE 'ZMONAT', "Period
lc_co_code TYPE amert VALUE 'ZBUKRS', "Company code
lc_gross_amt TYPE amert VALUE 'ZDMBTR', "Gross amount
lc_excpt_amt TYPE amert VALUE 'ZWHTINSSCA', "Exception amount
lc_period_def TYPE abkrs VALUE '00', "Default value for period
lc_amount_def TYPE amert VALUE '0.00', "Default value for amount
lc_date_def TYPE amert VALUE '00000000', "Default value for date
lc_exctype_mf TYPE abkrs VALUE 'MF', "Exception type value
lc_exctype_gr TYPE abkrs VALUE 'GR', "Exception type value
lc_field_obl TYPE aavis VALUE 'X', "Obligatory
lc_cancel TYPE aavis VALUE 'X', "Obligatory
lc_return TYPE aavis VALUE 'A', "Return parameter
lc_mandatory TYPE aavis VALUE '?', "Mandatory
lc_space TYPE abkrs VALUE ' ', "Space
lc_notsupported TYPE agitt VALUE 1, "Exception for FM
lc_others TYPE agitt VALUE 2, "Exception for FM
lc_error TYPE agitt VALUE 1, "Exception for FM
lc_confirm TYPE agitt VALUE 1, "Exception for FM
lc_text TYPE agitt VALUE 1, "Exception for FM
lc_start_column TYPE abkrs VALUE '50', "Start column
lc_start_row TYPE aavis VALUE '7', "Start column
lc_tabname TYPE amert VALUE 'ZTBRAP_TAX_EXCPT', "Table name,
lc_column TYPE SY-CUCOL VALUE 25, "Start column
lc_row TYPE SY-CUROW VALUE 6. "Start row
Clear Local Work Area
CLEAR :
lw_tax_excpt,
lw_key_table .
Clear Local Variables
CLEAR :
lv_ret,
lv_title,
lv_excpt_type,
lv_vendor,
lv_vendor_no,
lv_co_code,
lv_comp_code,
lv_answer.
Field symbol
field-symbols: <lf_tax_excpt>, "Tax exceptions values
<lf_tax_excpt_value>.
Move the text for entry
Move text-022 To lv_entry.
REFRESH lw_tax_excpt.
lw_tax_excpt-field_obl = lc_field_obl.
lw_tax_excpt-tabname = lc_tabname.
Determine which are key fields in the table. This is necessary to
control which fields are available for display
call function 'GET_KEY_FIELDS_OF_TABLE'
EXPORTING
tabname = lw_tax_excpt-tabname
mandt_needed = lc_field_obl
TABLES
key_fieldtab = lw_key_table
EXCEPTIONS
not_supported = lc_notsupported
others = lc_others.
if sy-subrc is not initial.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
loop at gt_fieldcat.
case gt_fieldcat-fieldname.
Supress fields you don't want to show
when lc_client or lc_user or lc_date or lc_time.
when OTHERS.
READ TABLE lw_key_table with key fieldname = gt_fieldcat-fieldname.
if sy-subrc is initial.
lw_tax_excpt-field_attr = lv_key.
lw_tax_excpt-field_obl = lc_field_obl.
else.
lw_tax_excpt-field_attr = lv_non_key.
lw_tax_excpt-field_obl = lc_space.
endif.
lw_tax_excpt-fieldname = gt_fieldcat-fieldname.
assign component lw_tax_excpt-fieldname of
structure lw_update_tax_excpt to <lf_tax_excpt>.
lw_tax_excpt-value = <lf_tax_excpt>.
lw_tax_excpt-fieldtext = gt_fieldcat-seltext_l.
Remove the condition obligatory
IF lw_tax_excpt-fieldname = lc_taxno.
lw_tax_excpt-field_obl = lc_space.
ENDIF.
append lw_tax_excpt.
endcase.
endloop .
Appending the reference table and field for amount field
if lv_mode = lv_insert.
lw_tax_excpt-tabname = lc_ref_tab.
lw_tax_excpt-fieldname = lc_ref_fld.
lw_tax_excpt-field_attr = lc_hide_fld.
append lw_tax_excpt.
endif.
IF lv_mode NE lv_delete.
Show selected entry
CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
do.
call function 'POPUP_GET_VALUES'
EXPORTING
popup_title = lv_title
start_column = lc_start_column
start_row = lc_start_row
IMPORTING
returncode = lv_ret
TABLES
fields = lw_tax_excpt
EXCEPTIONS
error_in_fields = lc_error
others = lc_others.
Exit if Error, Display or Delete
if sy-subrc is not initial or lv_ret = lc_return
or lv_mode = lv_display
or lv_mode = lv_delete..
exit.
endif.
Validate fields involved in ADDING NEW ENTRY
IF lv_mode = lv_insert . "ADD new Entry
Validate the field Period
READ TABLE lw_tax_excpt with key fieldname = lc_period.
IF lw_tax_excpt-value EQ lc_period_def.
PERFORM procWarnuser USING text-001 text-003 .
CONTINUE.
ENDIF.
Validate the field Company code
READ TABLE lw_tax_excpt with key fieldname = lc_co_code.
lv_co_code = lw_tax_excpt-value.
select single bukrs from t001 into lv_comp_code
where bukrs = lv_co_code.
IF sy-subrc is not initial.
PERFORM procWarnuser USING text-001 text-028 .
CONTINUE.
ENDIF.
Validate the field Vendor
READ TABLE lw_tax_excpt with key fieldname = lc_vendor.
lv_vendor = lw_tax_excpt-value.
select single lifnr from lfa1 into lv_vendor_no
where lifnr = lv_vendor.
IF sy-subrc is not initial.
PERFORM procWarnuser USING text-001 text-024 .
CONTINUE.
ENDIF.
Store the value of exception type in a variable
READ TABLE lw_tax_excpt with key fieldname = lc_exception_typ.
lv_excpt_type = lw_tax_excpt-value.
Validate the field Tax number1 other entities
READ TABLE lw_tax_excpt with key fieldname = lc_taxno.
IF lv_excpt_type EQ lc_exctype_mf or lv_excpt_type EQ lc_exctype_gr.
IF lw_tax_excpt-value EQ space.
PERFORM procWarnuser USING text-001 text-002 .
CONTINUE.
ENDIF.
ENDIF.
Validate the field Clearing date
READ TABLE lw_tax_excpt with key fieldname = lc_clearing_dt.
IF lw_tax_excpt-value EQ lc_date_def.
PERFORM procWarnuser USING text-001 text-004.
CONTINUE.
ENDIF.
Validate the field Gross amount
READ TABLE lw_tax_excpt with key fieldname = lc_gross_amt.
condense lw_tax_excpt-value no-gaps.
IF lw_tax_excpt-value EQ lc_amount_def OR
lw_tax_excpt-value EQ space.
PERFORM procWarnuser USING text-001 text-005.
CONTINUE.
ENDIF.
Validate the field Exception amount
READ TABLE lw_tax_excpt with key fieldname = lc_excpt_amt.
condense lw_tax_excpt-value no-gaps.
IF lw_tax_excpt-value EQ lc_amount_def OR
lw_tax_excpt-value EQ space.
PERFORM procWarnuser USING text-001 text-006.
CONTINUE.
ENDIF.
delete lw_tax_excpt index 10.
ENDIF.
all checks successful !!!!
exit.
enddo.
endif.
IF lv_mode EQ lv_delete.
CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = lv_title
text_question = text-025
TEXT_BUTTON_1 = text-026
TEXT_BUTTON_2 = text-027
DISPLAY_CANCEL_BUTTON = lc_space
START_COLUMN = lc_column
START_ROW = lc_row
IMPORTING
ANSWER = lv_answer
EXCEPTIONS
TEXT_NOT_FOUND = lc_text
OTHERS = lc_others
IF sy-subrc is not initial.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
Need to pop-out of the sub if "cancel" was selected
if lv_ret = lc_return or lv_mode = lv_display.
exit.
endif.
copy contents of pop-up back into structure
loop at lw_tax_excpt.
check lw_tax_excpt-value <> lc_mandatory.
assign component lw_tax_excpt-fieldname
of structure lw_update_tax_excpt to <lf_tax_excpt_value>.
<lf_tax_excpt_value> = lw_tax_excpt-value.
endloop.
update the database accordingly.
case lv_mode.
when lv_insert. "Insert
Give other required field values
lw_update_tax_excpt-mandt = sy-mandt. "Client
lw_update_tax_excpt-zuserch = sy-uname. "User
lw_update_tax_excpt-zdate_change = sy-datum. "Date
lw_update_tax_excpt-ztime_change = sy-uzeit. "Time
INSERT into ztbrap_tax_excpt values lw_update_tax_excpt.
message s036(zmbrap).
WHEN lv_change. "Change
Give other required field values
lw_update_tax_excpt-mandt = sy-mandt. "Client
lw_update_tax_excpt-zuserch = sy-uname. "User
lw_update_tax_excpt-zdate_change = sy-datum. "Date
lw_update_tax_excpt-ztime_change = sy-uzeit. "Time
MODIFY ztbrap_tax_excpt FROM lw_update_tax_excpt. "Update record
message s037(zmbrap).
WHEN lv_delete. "Delete
IF lv_answer = lc_confirm.
DELETE FROM ztbrap_tax_excpt WHERE
zmonat = lw_update_tax_excpt-zmonat AND
zbukrs = lw_update_tax_excpt-zbukrs AND
zlifnr = lw_update_tax_excpt-zlifnr AND
zexctype = lw_update_tax_excpt-zexctype AND
zstcd1 = lw_update_tax_excpt-zstcd1 AND
zaugdt_other = lw_update_tax_excpt-zaugdt_other AND
zdmbtr = lw_update_tax_excpt-zdmbtr AND
zwhtinssca = lw_update_tax_excpt-zwhtinssca.
message s038(zmbrap).
ENDIF.
endcase.
Now do refresh ...
if sy-subrc is not initial.
rollback work.
message e033(zmbrap).
else.
perform procGetTaxExceptionsData.
commit work.
perform procGetTaxExceptionsData.
lw_selfield-refresh = lc_field_obl.
lw_selfield-col_stable = lc_field_obl.
lw_selfield-row_stable = lc_field_obl.
endif.
endform. "procFindKeyFields
FORM procDisplayTaxExceptionsData *
Produce ALV report *
form procDisplayTaxExceptionsData.
Variables
DATA: lv_layout TYPE slis_layout_alv, "Layout
lv_dispvariant TYPE disvariant, "For display
lv_events TYPE slis_t_event, "Events
lv_grid_settings TYPE lvc_s_glay, "Grid settings
lv_event TYPE slis_alv_event. "Events
Constants
CONSTANTS:
lc_user_command TYPE slis_formname VALUE 'USER_COMMAND', "User command
lc_pf_status TYPE slis_formname VALUE 'PF_STATUS_SET_SHOW_LIST', "Pf status
lc_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE', "Top of page
lc_tab_name TYPE tabname VALUE 'ZTBRAP_TAX_EXCPT', "Table name
lc_stripes TYPE aavis VALUE 'X', "Stripes
lc_save TYPE aavis VALUE 'A', "Save
lc_repid TYPE sy-repid VALUE sy-repid, "Program name
lc_inconsistent TYPE agitt VALUE 1, "Exception for FM
lc_program TYPE agitt VALUE 2, "Exception for FM
lc_others TYPE agitt VALUE 3. "Exception for FM
Clear Local Variables
CLEAR:
lv_layout,
lv_dispvariant,
lv_events,
lv_grid_settings,
lv_event.
*Set up ALV structures
lv_dispvariant-report = lc_repid.
gv_repid = sy-repid.
lv_dispvariant-username = sy-uname.
*Set alternate stripes for ALV report
lv_layout-zebra = lc_stripes .
lv_grid_settings-coll_top_p = lc_stripes .
*Set up exit structure for top of coverpage
lv_event-name = slis_ev_top_of_coverpage.
lv_event-form = slis_ev_top_of_coverpage.
append lv_event to lv_events.
*Set up exit for top of page
lv_event-name = slis_ev_top_of_page.
lv_event-form = slis_ev_top_of_page.
append lv_event to lv_events.
*Build field catalog for List Viewer
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = lc_repid
i_inclname = lc_repid
i_structure_name = lc_tab_name
CHANGING
ct_fieldcat = gt_fieldcat[]
EXCEPTIONS
inconsistent_interface = lc_inconsistent
program_error = lc_program
others = lc_others.
field controls
PERFORM procBuildFieldcat.
Call ABAP/4 List Viewer
check not gt_fieldcat[] is initial.
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lc_repid
i_callback_user_command = lc_user_command
i_callback_pf_status_set = lc_pf_status
i_callback_top_of_page = lc_top_of_page
is_variant = lv_dispvariant
i_grid_settings = lv_grid_settings
is_layout = lv_layout
it_fieldcat = gt_fieldcat[]
it_events = lv_events
i_save = lc_save " A = All => Standard & User
TABLES
t_outtab = gt_tax_excpt_tab.
endform. "procDisplayTaxExceptionsData
**& Form PF_STATUS_SET_SHOW_LIST
Set modified standard status for list
form pf_status_set_show_list
using lw_excpt_tab TYPE slis_t_extab.
Workarea
DATA : lw_tax_tab TYPE slis_extab. "Type group Slis
Constants
DATA : lc_pfstat TYPE amert VALUE 'ZTAX_EXCEPTION', "Pf status
lc_prog TYPE sy-repid VALUE sy-repid, "Program name
lc_fcode TYPE gui_code VALUE 'SELI'. "Function code
Clear Workarea
CLEAR :lw_tax_tab.
lw_tax_tab-fcode = lc_fcode.
append lw_tax_tab to lw_excpt_tab.
set pf-status lc_pfstat of program lc_prog excluding lw_excpt_tab.
endform. "PF_STATUS_SET_SHOW_LIST
**& Form procBuildFieldcat
text
--> p1 text
<-- p2 text
form procBuildFieldcat .
Constants
CONSTANTS :
lc_co_code TYPE amert VALUE 'ZBUKRS', "Company code
lc_vendor TYPE amert VALUE 'ZLIFNR', "Vendor
lc_docu_no TYPE amert VALUE 'ZBELNR', "Document Number
lc_user TYPE amert VALUE 'ZUSERCH', "User
lc_date TYPE amert VALUE 'ZDATE_CHANGE', "Date
lc_time TYPE amert VALUE 'ZTIME_CHANGE', "Time
lc_taxno TYPE amert VALUE 'ZSTCD1', "Tax Number
lc_exception_typ TYPE amert VALUE 'ZEXCTYPE', "Exception type
lc_clearing_dt TYPE amert VALUE 'ZAUGDT_OTHER', "Clearing date
lc_period TYPE amert VALUE 'ZMONAT', "Period
lc_gross_amt TYPE amert VALUE 'ZDMBTR', "Gross amount
lc_excpt_amt TYPE amert VALUE 'ZWHTINSSCA'. "Exception amount
Set the Fieldtext for the Dictionary fields
LOOP AT gt_fieldcat.
gt_fieldcat-key = space.
CASE gt_fieldcat-fieldname.
WHEN lc_period.
gt_fieldcat-seltext_l = text-007.
MODIFY gt_fieldcat.
WHEN lc_co_code.
gt_fieldcat-seltext_l = text-008.
MODIFY gt_fieldcat.
WHEN lc_vendor.
gt_fieldcat-seltext_l = text-009.
MODIFY gt_fieldcat.
WHEN lc_exception_typ.
gt_fieldcat-seltext_l = text-010.
MODIFY gt_fieldcat.
WHEN lc_taxno.
gt_fieldcat-seltext_l = text-011.
MODIFY gt_fieldcat.
WHEN lc_clearing_dt.
gt_fieldcat-seltext_l = text-012.
MODIFY gt_fieldcat.
WHEN lc_docu_no.
gt_fieldcat-seltext_l = text-013.
MODIFY gt_fieldcat.
WHEN lc_gross_amt.
gt_fieldcat-seltext_l = text-014.
gt_fieldcat-outputlen = 12.
MODIFY gt_fieldcat.
WHEN lc_excpt_amt.
gt_fieldcat-seltext_l = text-015.
MODIFY gt_fieldcat.
WHEN lc_user.
gt_fieldcat-seltext_l = text-016.
MODIFY gt_fieldcat.
WHEN lc_date.
gt_fieldcat-seltext_l = text-017.
MODIFY gt_fieldcat.
WHEN lc_time.
gt_fieldcat-seltext_l = text-018.
MODIFY gt_fieldcat.
ENDCASE.
ENDLOOP.
endform. " procBuildFieldcat
*& Form procWarnuser
Warn User - Give error message
-->P_TEXT text
-->P_TEXT text
-->P_lw_tax_excpt_VALUE text
FORM procWarnuser USING uv_title TYPE itex132
uv_text1 TYPE itex132.
Constants
CONSTANTS :
lc_start_column TYPE SY-CUCOL VALUE 25, "Start column
lc_start_row TYPE SY-CUROW VALUE 15. "Start row -
Interval in the module pool selection screen
Hi Experts,
I am creating selection screen in module pool program. I know how to set search help for each field.
But if I have select-options like fields, how can I have "Interval button". Is there any fuction module for that? should I use ranges?
Thanks and regards,
VenkatHi,
Follow these steps:-
To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
Create a button next the high value textbox and keep its sutaible function code.
Now, to call the pop-up on this button click, we have to call the same pop-up as in standard select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
To pass the table name and field name details into the FM, we have to declare as:
DATA : tab TYPE rstabfield.
This structure comprises of table name and field name.
Pass these details in program as:-
u2003
*-- clear table and field details
CLEAR tab.
*-- append for range depending on the button clicked
* either for sales order or line item
CASE sy-ucomm.
WHEN 'VBELN'.
tab-tablename = 'VBAP'.
tab-fieldname = 'VBELN'.
*--To call the popup screen for the field use code:-
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002 u201Ctitle text
text = ' '
signed = 'X'
search_help = v_shelp u201Csearch help if required
tab_and_field = tab u201Ctable and field name details
TABLES
range = r_vbeln u201Crange for the associated field
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
Hope this helps you.
Regards,
Tarun -
Please help me out with the function code of print option in module pool
please help me out with the function code of print option in module pool, along with CASE condition.
regards,
asifHi
you can use the Function module
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LP01' "'Printer name
list_name = 'TEST'
list_text = 'SUBMIT ... TO SAP-SPOOL'
immediately = ' '
line_size = '2000'
no_dialog = 'X' "pass space to Pop screen for Print option
IMPORTING
out_parameters = wa_pri_params
valid = w_valid.
"next call below things
NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params.
"and try to Print the values inside the new-page
NEW-PAGE PRINT OFF.
Prabhudas -
Module pool program - populating values for columns in Table control
Hi all,
In my module pool program Table control i am having 10 columns fields.
in one of the column field i have used 'PROCESS ON VALUE-REQUEST' to get the material no.
in that F4 search help list is having releated information of the material like material group, company code, description etc.
user while searching for material they will use F4 search help and in that list they will select the material .
From the list I need releated information of the materials like material group, company code, description etc
to be populated in other columns while selecting the material .( User is not ready to enter all the values for the fileds)
I appended the releated values for the material in the Table control Internal table in the Process on value-request Module.
(after selecting material by the user from F4 search help)
even then I am not getting the data in the screen.
kindly help me how to proceed to get the data in other columns.
Thanks in advance,
sharmaHi Himanshu Verma ,
Thanks for fast reply.
but i tried with field names available in F4 Internal table.
even then I am not getting.
T_DYNPFLD_MAPPING-FLDNAME = ' MTART.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
T_DYNPFLD_MAPPING-FLDNAME = 'MBRSH'.
APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
SELECT
MATNR
MTART
MBRSH
MATKL
BISMT
MEINS
BSTME
FROM MARA
INTO TABLE INT_F4
up to 5000 rows
CLEAR INT_F4.
****function module to get pop-up window of f4.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATNR'
DYNPPROG = W_PROGNAME
DYNPNR = W_SCR_NUM
DYNPROFIELD = 'V_TAB-MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = INT_F4
RETURN_TAB = RETURN_VALUES
DYNPFLD_MAPPING = ITAB_DYNPFLD_MAPPING
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE .
V_TAB-matnr = RETURN_VALUES-FIELDVAL.
endif.
I have used the above code. I am not getting the field values available in ITAB_DYNPFLD_MAPPING.
kindly help me how to get the exact row for the F4 table.
Thanks in advance.
sharma
Maybe you are looking for
-
Hi all, I have an excel sheet with 2 spread sheets. 1 hidden and other visible. 1) How to read the excel so that the hidden fields dont come into the internal table in which the data is read? 2) when the data is read from the visible tab of the excel
-
Connecting Inspire T7700 to Audigy 2 NX + Louder bass at a certain frequency
Hello, I wasn't sure if this should go to the soundcard forums instead. In the Inspire T7700's box there was a cable that had 4 stereo connections on each side, and I used that to connect the card to the speakers. I have the upmix on the speakers set
-
I am unable to save my revised iTunes security question. What am I doing wrong?
I originally setup up the account for my daughters Ipod and now I don't remember the answers to the Security questions for Itunes. I try to reset them and fill in new answers to new questions but everytime I do and click save, the screen appears to
-
Font issue between indesign and another application
I'm having issues with some fonts used in indesign that are not found in another app. For example, Antihistory Regular is used in the indesign document but the other app is looking for Antihistory Book?
-
HT1218 it is not working at all with windows 8... what can i do?
hi... i got a new pc with windows 8 OS and airport utility SW is not detecting the time capsule at all. however the pc is perfectly connected to the the TC wireless network. what can i do?