Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PM orders userexits/BADIs (transaction IW31/IW32)

Former Member
0 Kudos

Hi,

I am looking for a userexit or a BADIs that can track the changes at component level and save them to a customer table at save time. Please help if you know any of userexit/BADIs or you know a way of how to track the changes such as required quantity, required date, ....

Many thanks,

Chuong

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can try IWO10009. This is fired at time of save of the PM order. You can probably access the components using field symbols, but they are not passed to the corresponding funciton module.

Regards,

RIch HEilman

17 REPLIES 17

former_member181966
Active Contributor
0 Kudos

I can only see 1 user exit :

IWO10012

and Badi :

AAPM

BADI_CIF_PM_ORDER

CR_WORKCENTER_SELECT

FI_HEADER_SUB_1300

HR_BPS_FILL_PME97

HRFPM_ENC_PER

HRFPM_HR_RESPONSIBLE

HRHAP00_ADD_ON_APPL

HRHAP00_CATALOG_ACT

HRHAP00_CATEG_CREATE

HRHAP00_CHECK_CUSTOM

HRHAP00_INIT_CATALOG

HRPAD00_PAPM

INST_AUTHORITY_CHECK

IWOC_LIST_TUNING

PMRE_MCB_RETRACT

RPM_CALC_HRINT_BPFTE

RPM_FIN_INTF

SPI_TOOL

WORKORDER_CONFIRM

WORKORDER_GOODSMVT

WORKORDER_UPDATE

also check Exits

EXIT_SAPLCLD1_001 Fill the Customer-Specific IDoc Structures

EXIT_SAPLCLD1_002 Read the Customer-Specific Enhancements fr

EXIT_SAPLCOMK_004 PM Order: Customer Enhancement - Default f

XCOF Customer Exits Order Confirmation CORF

EXIT_SAPLCORF_001 PM/SM Order Confirmation: Customer-Specifi

EXIT_SAPLCORF_002 PM/SM Order Confirmation: Customer-Specifi

EXIT_SAPLCORF_003 PM/SM Order Conf.: Customer-Specific Check

EXIT_SAPLCORF_004 PM/SM Order Confirmation: Customer-Specifi

EXIT_SAPLCORF_005 PM/SM Order Conf.: Customer-Spec. Enhancem

XCQB Customer Exit for FUGR CQBM

EXIT_SAPLCQBM_002 Customer Enhancement when Merging QPM* and

Godd luck !!!

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can try IWO10009. This is fired at time of save of the PM order. You can probably access the components using field symbols, but they are not passed to the corresponding funciton module.

Regards,

RIch HEilman

0 Kudos

Thanks Rich,

I use field symbols of type structure RESBD and I can get the fields I need at component level.

FIELD-SYMBOLS: <fs> TYPE resbd.

ASSIGN ('(SAPLCOIH)RESBD') TO <fs>.

0 Kudos

Rich,

Do you know how to get data for all line items in an internal table using field symbols?

Thanks!

0 Kudos
ASSIGN ('(SAPLCOIH)<b>RESBD[]</b>') TO <fs>.

Please try using the brackets here

You might also have to define a table type for RESBD.

FIELD-SYMBOLS: <fs> TYPE<b> zresb_TT</b>.

THere doesn't seem to be a table type with the structure RESBD.

Regards.

Rich Heilman

0 Kudos

Rich, it does not work. Do you know why? I cannot debug the error.

0 Kudos

what is the error? Is it not assigning?

Regards,

Rich Heilman

0 Kudos

Yes, the field symbols is not assigning.

0 Kudos

I see, RESBD is not an internal table. it is a structure being used.

Regards,

Rich Heilman

0 Kudos

Please try the following. This works in my system. You are looking at the wrong program in the stack.



data: element(50) type c.

field-symbols: <iresbd> type table.

element =<b> '(SAPLCOBC)RESB_BT[]'.</b>
assign (element) to <iresbd>.

REgards,

Rich Heilman

0 Kudos

It is now working for table, but when I delete a line item, the item still shows up in the table with the deletion flag is blank. How do I know if a line is deleted?

Chuong

0 Kudos

Oh, I didn't know that you were trying to modify the line. This may be a problem as the user exit is not designed for you to hack the table. Doing so may cause some inconsistancies. I tend to access data like this only when I need the data for something else, not to modify or delete it.

Regards,

Rich Heilman

0 Kudos

Rich, maybe you misunderstood my point. I delete the item from the component screen and at save time I assume that it should not appear on the internal table or it does appear with a deletion flag = 'X'. In fact, it still shows up in the table with the deletion flag = ' '. So, reading from the table I do not know if a line item is deleted? Hope this clarifies things.

Kind regards,

Chuong

0 Kudos

Are you still looking for a solution? I can give an answer which may help you.

0 Kudos

Thanks Dubba Vikram for your time, I got my problem solved. I can check for field VBKZ to determine if a component has been inserted, updated or deleted.

Regards, Chuong

0 Kudos

I see that you've found a solution but wanted to add to the post as I've run into this same challenge in the past. There exist a couple of user exits on the PS networks side that seem to co-exist with the PM orders. CNEX0037 CNEX0038 and CNEX0039 all handle exactly the scenario you describe and, as near as I can tell, they are called in the SAPLCOMK program that is shared bewteen the PM orders and PS networks.

Regards,

Pete

0 Kudos

how can I use this in the programm

how can I check for example which matnr i thisd position was used?