cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help with BADI /SAPAPO/PWB_TPSRC_IN

ChadRichardson
Participant
0 Kudos

Good afternoon, Experts

Documentation for BADI /SAPAPO/PWB_TPSRC_IN says that its supposed allow you to manipulate External Procurement Relationships being created from CIF'd Scheduling Agreements.

I'm trying to use method PUR_TPSRC_IN_EXIT to default the Release Creation Profile (abueb) for ALL external procurement relationships (See code below)

DATA ls_row TYPE /SAPAPO/TPSRC_STR.

LOOP AT CT_TPSRC INTO ls_row.

ls_row-abueb = 'Z001'.

MODIFY TABLE CT_TPSRC FROM ls_row.

ENDLOOP.

Problem is that the MODIFY statement above is returning a 4 anytime I try to change any value in ls_row.

Has anybody successfully been able to do anything with this BADI???

Any help would be greatly appreciated!!!

Thanks,

Chad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Chad - try adding an index to your MODIFY statement.

Example: MODIFY TABLE CT_TPSRC FROM ls_row INDEX sy-tabix.

Another way to achieve this is to do the entire table in one statement:

ls_row-abueb = 'Z001'.

MODIFY CT_TPSRC[] FROM ls_row TRANSPORTING abueb WHERE mandt = sy-mandt.

Once you get past the ABAP then you can see the BADI working.

Regards

Andy

Answers (1)

Answers (1)

ChadRichardson
Participant
0 Kudos

Thanks Andy!!!

Including INDEX was all it took.

Much appreciated!!!