12-02-2007 11:04 AM
Hi Experts
I am working on one of the enhancement whose objective is to change WBS based on the settlement rule receiver.
1. The problem is that the screen field DKOBR-EMPGE does not retain the settlement receiver value. Hence I have used COBRA-SORT field.
This field only has value when I visit the settlement rule screen and press the save button in change mode i.e IW32.
This code does not work if IW31 is executed. Please find my code below.
(I have also tried structure COBRB-PS_PSP_PNR)
2. The second problem is that we do not have any user exit which holds settlement receiver value as import.
I am using the following code in EXIT_SAPLCOIH_010 (IWO10010)
DATA :
l_field(50) TYPE c VALUE '(SAPLKOBS)COBRA',
l_sort_field(50) TYPE c,
l_len TYPE i ,
ls_cobra TYPE cobra.
IF caufvd_imp-pspel IS INITIAL.
IF v_empge IS INITIAL.
Get the screen field value in field symbol
ASSIGN (l_field) TO <fs_cobra>.
IF sy-subrc EQ 0.
ls_cobra = <fs_cobra>.
UNASSIGN <fs_cobra>.
ENDIF.
If value is populated it will be mostly in format XXNNNNNNN. Hnece remove the first two characters
IF NOT ls_cobra-sort IS INITIAL.
l_sort_field = ls_cobra-sort .
l_len = STRLEN( l_sort_field ).
l_len = l_len - 2.
v_empge = l_sort_field+2(l_len).
pspel = v_empge.
ENDIF.
ENDIF.
Any inputs will be helpful
Thanks in Advance
Meghana
07-24-2008 1:46 PM
hi maghana,
can you plese update the result what you have done at that time mine is also the same case if possible can you please send the code
Thanks for ur help
07-25-2008 8:44 AM
This [post|http://www.sapfans.com/forums/viewtopic.php?f=7&t=315752] may be of some use
PeteA
[www.pjas.com]