cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit at the time of saving Prod Order.

Former Member
0 Kudos

Hi All,

I am an ABAPer.I have a requirement where I need to change the format of serial no generation.The new format has to take care of Basic start date in consideration.As of now the serial no is generated through a user exit which has a FM in it.The FM uses current date for generation.Also serial no gets generated when a Prod Order is saved.Now this FM doesn't have any import parameter where i can pass start date i.e field gstrp in CAUFVD.Now i want to know any user exit which gets called on saving Of Prod order so that i can pass start date through that.I have tried PPCO007

and PPCO0012 but they didn't get called on saving of Prod Order.Can someone suggest how to achieve this.

Thanks in Advance,

Saket.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Saket,

In the FM where you are creating serial numbers, for getting the basic start date try the following code.

FIELD-SYMBOLS: <fs_caufvd> TYPE caufvd .

DATA: ls_date LIKE sy-datum .

ls_caufvd LIKE caufvd ,

ASSIGN ('(SAPLCOKO1)CAUFVD') TO <fs_caufvd>.

IF sy-subrc <> 0.

ls_caufvd = <fs_caufvd> .

ls_date = ls_caufvd-gstrp.

ENDIF.

Now ls_date contains the basic start date.

You can use it anywhere you want to use.

Reward if helpful.

Thanks,

Mandeep

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Badi WORKORDER_UPDATE could be interessting for you too.

Regards,

Sabine

Former Member
0 Kudos

Hi,

You can try field exit for this.

Data Element GERNR

FM FIELD_EXIT_GERNR

This is for serial number.

Regards

Amit Parkhi