Populating Values In Module Pool Dynamically
Hi All The ABAPers,
I have a requirement in Module Pool to populate the values in the field dynamically from the ZTable which I have created having two fields MAIN_CAUSE and SUB_CAUSE. For a MAIN_CAUSE say A there may be N SUB_CAUSE.
Now when the user selects MAIN_CAUSE A with F4 help then dynamically it should populate only those N values in F4 help for SUB_CAUSE which belong to the selected MAIN_CAUSE A.Rest values it should not populate.
This should happen without pressing ENTER or anything else.
Kindly guide me in this matter.Hope I have clarified my requirement.
Thanks in advacnce,
Regards,
Bharti Jain
Moderator Message: spec-dumping is not allowed. Do your own work.
Edited by: kishan P on Oct 12, 2010 4:18 PM
//Now when the user selects MAIN_CAUSE A with F4 help then dynamically it should populate only those N values in F4 help for SUB_CAUSE which belong to the selected MAIN_CAUSE A
use FM's
DYNP_VALUES_READ
DYNP_VALUES_UPDATE to acheive the same
User can select the value from f4 of main_cause and the related field can be pushed into subc_Cause!..
Similar Messages
-
How to pass the field value from module pool program to smartform using submit?
// AT pai of module pool pgm i entered the following: here gv_orderid is my value to be available at smart form(driver pgm) & zmusic_store_smf is the driver program of my smartform.
gv_orderid= wa-itemid./
SUBMIT ZMUSIC_STORE_SMF VIA SELECTION-SCREEN
WITH p_order = gv_orderid
AND RETURN.
//AT driver pgm(zmusic_store_smf):
START-OF-SELECTION.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMUSIC_SMARTFORM1'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = lv_form
EXCEPTIONS
no_form = 1
no_function_module = 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.
CALL FUNCTION lv_form
EXPORTING
* iv_orderid = is_purchase_item-zorder_id.
iv_orderid = gv_orderid.
// here i'm trying to call my smartform('ZMUSIC_SMARTFORM1') from this driver pgm but unable to access the value of gv_orderid please help me out with this.Declare the gv_orderid in modulepool program.
And Declare the parameter as import parameter in smartform.
CALL FUNCTION lv_form
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
i_input = gv_orderid
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5 -
How to validate the field values in module pool program?
Hi Guys
I am working with module pool programming.
Here I want to validate the fields like below.
with out filling all the fields if I click SAVE option it has to show a message that all fields has to be filled. This can be done by checking all the fields individually.
I think it can be done through <b>LOOP AT SCREEN ......ENDLOOP</b>. sequence.
If it is possible, can anyone help me?You need to write the Module in between the CHAIN and ENDCHAIN statment in SE51
If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:
CHAIN.
FIELD: <f1>, <f 2>,...
MODULE <mod1>.
FIELD: <g1>, <g 2>,...
MODULE <mod2>.
ENDCHAIN.
all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.
Look at the DEMO program DEMO_DYNPRO_FIELD_CHAIN.
ashish -
Hi all,
I am developing one module pool program.There are 2 screens in this object.In the first screen there are four fields.One of the field is order type.In this order type field i one to set FD as default value,so that when this screen comes up then FD will be in order type field.How I can do that?
Waiting for your response.
Thanks in advance.
RajHi,
Try it:
parameters: p_ordertype type ordertype default 'FD'.
Regards,
Chris Gu -
Getting default values in module pool screen
Hi frenz,
I have a requirement like in module pool i am supposed to bring 4 fields from ddic,in which the first two fields should have a default value i.e when the pbo is processed itself the input values should be displayed in first two fields.....can some one help me out to solve the issue.
thanks
prem
Edited by: prem kumar on Jun 19, 2008 1:30 PMsuppose u are using field1 field2 on screen...
then in PBO create a module
module def_val.
inside it write.
field1 = '100'.
field2 = '101'.
here 100 and 101 are the default values that u r going to assign....
that will solve ur issue..
rewrd points if the ans is helpful... -
Default values in module pool screen issue
Hello,
I have 6 input fields in one of my module pool tab-strip. I can able to populate default values in 4 fields, but 2 fields are not showing default value on the screen. I am passing these default value for all 6 fields in PBO module of that screen. My question is, why only these 2 fields are not showing default values on the screen?
Thanks,
ShreeEdgar,
Thanks for the reply, I checked again, the screen fields and variables name is exactly same.
Here is the sample code:
MODULE status_2050 OUTPUT.
gv_id_no_2050 = '200'.
gv_matnr_2050 = '232020191'.
gv_ebeln_2050 = '20019100'.
gv_qty_2050 = 3.
gv_bukrs_2050 = 'JP01'.
gv_comments_2050 = 'my comments here'.
ENDMODULE. -
Hello Experts,
I have a module pool where in a table control I have fields like posnr matnr material description and quantity.
In this posnr field I want values like 10 20 upto 200.which has a increment in 10.
I have added this logic but this posnr values are not getting displayed once I press enter.
How can I display all these values from 10 to 200 even after pressing enter.
Thanks and Regrds,
Nikhil.Hi,
Please check if ur logic is getting triggered when enter is pressed.
Then if so, at the end of internal table updation, update the number of table control lines as follows:
DESCRIBE TABLE t_internal_table LINES TC_TABL_CTRL-LINES.
Regards,
Sasi. -
How to pass variable value into module pool scren from a report program
Hi,
I have created a report program with selection screen parameters. when the inputs are filled and executed it generates the purchase evaluation sequence number. i have created a screen and passed that number to display on it with print option and back option buttons as required. but variable alone is not getting passed from the program to module pool screen. buttons are working fine. value alone is not coming. can anyone please help me.
regards,
sudha.Hi ,
you need to declare that variable param at Global.
sample code...
report xyz....
data: g_no type ekko-ebeln.
start-of-selection...
g_no = '12345'.
call screen 0100. -
How to capture the selected values from module pool dialog list box !
Hi experts,
Can anyone help me out in capturing the values from the list box.
i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
Your inputs are appreciated.
Thanks,
Vijay.Along with the PBO and PAI event, add a POV event in the flow logic of the screen
DEMO_DROPDOWN_LIST_BOX -is a good demo example.
PROCESS ON VALUE-REQUEST.
FIELD structure_name-field_name MODULE create_dropdown_box.
In the report :
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
sdyb_conn-carrid will contain your selected field -
How to create a Drop down with values in Module Pool for a screen field.
Hi all,
I have created a Screen on which one field is created Say Bank Name. I would like to give some spcific value for this fileld where user can select only seeing in drop down cann't enter.
Can anyone tell how can we do it ?Hi,
The selected value key will be stored in the parameter.
eg: Refer below code. Here if i select Vinod then po_name will be 1. After this read i_values WITH this key and get the actual value.
PARAMETERS: po_name(30) TYPE c VISIBLE LENGTH 20 AS LISTBOX.
TYPE-POOLS: VRM.
DATA: i_values TYPE vrm_values,
wa_values LIKE LINE OF i_values.
AT SELECTION-SCREEN OUTPUT.
wa_values-key = '1'.
wa_values-text = 'Vinod'.
APPEND wa_values TO i_values.
wa_values-key = '2'.
wa_values-text = 'Kumar'.
APPEND wa_values TO i_values.
wa_values-key = '3'.
wa_values-text = 'Reddy'.
APPEND wa_values TO i_values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'PO_NAME'
values = i_values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
START-OF-SELECTION.
READ TABLE i_values INTO wa_values WITH KEY key = po_name.
MOVE wa_values-text TO w_name. " This will be ur actual value.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Jul 8, 2008 4:16 PM -
List box values in module pool
Hi All,
Plz help me out in this regard..
I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
that is after selecting values if i press enter on the screen the values are over written by space..
The default value for list boxes are space.
how to over come this problem...Plz help me out
Regards,
SudhaPAI
MODULE user_command_1000 INPUT.
CASE sy-ucomm.
WHEN 'SAVER'.
IF zrule_date_from > zrule_date_to.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
'Than RUN_VALIDITY_FROM_DATE'(002).
EXIT.
ENDIF.
IF zrule_date_to < sy-datum.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
'Than System Date.'(004).
EXIT.
ENDIF.
wa_rule-zrule_date_from = zrule_date_from.
wa_rule-zrule_date_to = zrule_date_to.
wa_rule-zrule_name = zrule_name.
wa_rule-zrule_id = zrule_id.
wa_rule-zrule_pref = zrule_pref.
ONCATENATE 'Where' rule_for1a operator1a values1a
andor1 rule_for2a operator2a values2a
andor2 rule_for3a operator3a values3a
andor3 rule_for4a operator4a values4a
andor4 rule_for5a operator5a values5a
andor5 rule_for6a operator6a values6a
andor6 rule_for7a operator7a values7a
andor7 rule_for8a operator8a values8a
INTO wa_rule-zrule_clause SEPARATED BY space.
In this code andor6(7,8,etc) has (and or)
and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
MY PBO code is
MODULE status_1000 OUTPUT.
SET PF-STATUS 'RULE'.
SET TITLEBAR '1000'.
ENDMODULE. " STATUS_1000 OUTPUT
*& Module fill_lists OUTPUT
For Filling List Boxes
MODULE fill_lists OUTPUT.
**********1
name = 'ANDOR1'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
**************2
name = 'ANDOR2'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
************3
name = 'ANDOR3'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
etc. -
How to get the perious values in Module pool by pressing the space or back
Hi All,
I want to see the already entered values in the screen when ever pressing the backspace or space bar buttons..
For example in TCODE SE38 in program when i press the backspace or space bar , it is showing the perious opend programs, the same senario i want to implement . Could you please provide me with some example for this..
Thanks in advance
Regards,
BharaniHI Rob,
Thanks for the reply...
history is turned on but for one field is coming and not for the other field in the same screen....
Regards,
Bharani -
Fetching sub-screen check box value in module pool
Hi,
i hav a req in which i craeted a sub-screen in a standard sap screen QA11 using screen -exit.
This sub-screen has two check box's for 2 approvals.I hav craeted as screen with this 2 check box and made that as a sub-screen to main screen.
I hav few validations to be performed on these 2 check-boxes.
1.Enabling and disabling of resp check-box based on some condition.This is happening as i hav written some logic in PBO of the screen.
2.Validations hav to be performed on the check-box like if user clicks a check-box that value has to be captured and stored in a Z custom table.My main issue comes here.i hav written some code in PAI,but when i put a break-point,that code is not at all getting triggered.
Kindly,let me know how can i get the check-box value from the sub-screen which is craeted in the standard screen of QA11 using screen-exit.
Thanks in advanceHi,
May be your code is written in PAI of some other screen.
check SY-DYNNR and also use this where you are checking chekbox value.
make sure your code is written in PAI of same subscreen
Thanks
Raghav M. -
How to reset values in module pool?
Hi ,
I have a requirement to refresh all the values from the screen on pressing the reset button.
I have one main screen which have the reset button and four subscreens, and each subscreen has different set
of fields.i am clearing the values in each subscreen. But the values are not getting cleared,
When I debugged i saw the values are getting cleared but it is not getting assigned in the screen.
Kindly help.Hi Nidhi,
When the user tries to reset use the statement.
Leave to transaction <Your transaction code>. -
Call module pool program from report
Hi,
Iam calling module pool program from a report, while passing values to module pool program, one of the field doesn't have parameter id, how to pass value to it. and also please let me know how to call module pool program.
Appreciate your help.
Thanks in advance
jogHi Jog,
Module pool program can be run in background. Most of the BDC's are written on module pool programs and they run in the background.
Also regarrding copying the standard program, if you require to make the changes for every user then instead of copying the program make modification in standard program as copied program are much harder to maintain during support pack implementation or upgrade that modification to standard program.
Reward points if useful.
Regards,
Atish
Maybe you are looking for
-
In idoc to file scenario, if XI system is down where do idocs pile up?
In idoc to file scenario, if XI system is down where do idocs pile up (get stuck) what tcode can I use to reprocess it?
-
PhotoShop Cs5 to Cs3 Brush issue
Hello. Previously I was using PhotoShop CS5 for my personal art design, however i had to switch back to CS3 for various reasons. Having devoted a lot of time and care into my CS5, I saved up my swatches, styles, brushes, etc..... so I wouldn't lose a
-
Cisco AIR -LAP-1142 status led continuosly blinking green
hello all, I have implemented around 46 access points (AIR-LAP-1142) in a customer site and i can see that the led of some of the access points are continously blinking green and no clients are associated to these access points. I have a
-
Ebay folder with a star - but no update when I look
I have a little notification box that my ebay app had an update. When I went to the main app icon there was a star so I went on but had no update either on ebay or on app world where updates usually can be run from. I did a battery pull, when phone i
-
Quisiera saber como hago para insertar una avatar en una presentación de captivate
Necesito los pasos para poder hacer los procedimientos adecuados para realizar mis dudas. Espero que me puedan ayudar con este problema