Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

EXIT_SAPLCOIH_010 (IWO10010) to change WBS based on settlement rule.

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

Former Member
Not what you were looking for? View more on this topic or Ask a question