Skip to Content
0

BW End routine

Sep 01, 2017 at 12:36 PM

91

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Ashu Yadav Sep 01, 2017 at 01:01 PM
0

Hi There

SELECT notificatn maintplant should be

SELECT maintplant notificatn ,as declared in structure

Thanks

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 04, 2017 at 07:43 AM
0

Hi Ashu thnx a lot.. hav a question . can we create union(Composite provider) with out a common primary key in both ADSos?

Share
10 |10000 characters needed characters left characters exceeded
Ashu Yadav Sep 04, 2017 at 10:44 AM
0

Yes you can ...but it can have performance issues, not suggested at all

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

join also create same issue right? without a common key field

0

yepp..but anyways if less data i could have gone with it

0