2013 Oct 09 8:51 AM
Dear Experts,
My requirement is that i want to add and an additional i/p field in SAPMJ1IG screen 0400.
I have added field (ADD_RG_NO) but when i m trying to use this in my code. It is not showing values entered.
Kindly guide.
Please refer screnn shot for refernce.
Thanks.
Harsh
2013 Oct 09 10:02 AM
Hello Harsh,
As this screen is a standard one and by default you do not have the ADD_RG_NO field, try to read the values from there with function module DYNP_VALUES_READ importing field names.
The function has documentation about using it.
Have a nice day,
Paul.
2013 Oct 09 10:02 AM
Hello Harsh,
As this screen is a standard one and by default you do not have the ADD_RG_NO field, try to read the values from there with function module DYNP_VALUES_READ importing field names.
The function has documentation about using it.
Have a nice day,
Paul.
2013 Oct 09 11:55 AM
Hi paul
I Tried using this function module getting error INVALID_DYNPRONAME.
Can u please share the Import parameters to be passed, mine is as below
data: dyname like d020s-prog value 'SAPMJ1IG',
dynumb like d020s-dnum value '0400'.
data: begin of dynpfields occurs 3.
include structure dynpread.
data: end of dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = dyname
DYNUMB = dynumb
* TRANSLATE_TO_UPPER = ' '
* REQUEST = ' '
* PERFORM_CONVERSION_EXITS = ' '
* PERFORM_INPUT_CONVERSION = ' '
* DETERMINE_LOOP_INDEX = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
DYNPFIELDS = dynpfields
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* INVALID_PARAMETER = 7
* UNDEFIND_ERROR = 8
* DOUBLE_CONVERSION = 9
* STEPL_NOT_FOUND = 10
* OTHERS = 11
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
2013 Oct 09 12:18 PM
Harsh,
Set a break-point in the screen and check the SY-CPROG variable please.
2013 Oct 09 12:50 PM
Still not working. The value I passed and SY-CPROG have same value.
2013 Oct 09 12:58 PM
You call the function in the PAI module, right ?
Weird because I was debugging some days ago a situation exactly like yours, and worked well...
2013 Oct 09 1:22 PM
Hi Paul
Solved the error.
But still it is not returning any values.
I have written the code in
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0300 AT EXIT-COMMAND.
In USER_COMMAND_0300 there is
PERFORM user_command.
In user_command
DATA LIN TYPE I.
PERFORM check_confirm_data_loss.
*************My CODE*******************
Thanks
Harsh
2013 Oct 09 1:29 PM
2013 Oct 09 1:43 PM
Try the code below:
data: dyname TYPE d020s-prog value 'SAPMJ1IG',
dynumb TYPE d020s-dnum value '0400'.
data: gt_dynpfields type table of dynpread,
gs_dynpfields type dynpread.
clear gs_dynpfields.
gs_dynpfields-fieldname = 'ADD_RG_NO'.
APPEND gs_dynpfields TO gt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = dyname
DYNUMB = dynumb
TABLES
DYNPFIELDS = gt_dynpfields
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
2013 Oct 10 9:28 AM
Hi Paul.
This code worked for me. Thanks alot.
Below part of code did the trick
clear gs_dynpfields.
gs_dynpfields-fieldname = 'ADD_RG_NO'.
APPEND gs_dynpfields TO gt_dynpfields.
2013 Oct 09 12:03 PM
Hi,
Check the table control structure. is this field (ADD_RG_NO) did u added in that structure.
In PBO maintain this field in
LOOP AT... ENDLOOP
Thanks,
Rajesh.