Skip to Content
0
Sep 01, 2017 at 12:36 PM

BW End routine

186 Views

Hi Folks,

I want to read maintplant (maintenance plant ) from Pnotificatn (masterdata) and populate plant with maintplant data. (Both are having same values ).

so prepared a basic logic in end routine and it is not working. plant field is blank after data load. Could you Please suggest me how to do this.

TYPES: BEGIN OF TY_STR1,

maintplant type /BI0/Pnotificatn-maintplant,

notificatn TYPE /BI0/Pnotificatn-notificatn,

END OF TY_STR1.

DATA : IT_TAB1 TYPE TABLE OF TY_STR1.

DATA : WA1 LIKE LINE OF IT_TAB1.

IF RESULT_PACKAGE IS NOT INITIAL.

SELECT notificatn maintplant FROM /BI0/Pnotificatn INTO TABLE IT_TAB1 FOR ALL ENTRIES IN RESULT_PACKAGE WHERE notificatn = RESULT_PACKAGE-NOTIFICATN.

LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.

READ TABLE IT_TAB1 INTO WA1 WITH KEY NOTIFICATN = <RESULT_FIELDS>-NOTIFICATN.

IF SY-SUBRC EQ 0.

<RESULT_FIELDS>-plant = WA1-MAINTPLANT .

ENDIF.

ENDLOOP.

ENDIF.

Thanks a ton in advance.

Regards,

Raki