Skip to Content
0

Restrict internal batch number for a particular order type in CO01

Apr 11, 2017 at 06:48 AM

120

avatar image

Hi Experts ,

I maintained user exit to create external batch and am adding date to batch number , it is working fine (in Goods Receipt TAB in CO01 ) .


But now I wanted to disable internal batch creation when user clicks on create button , means user have to key in the batch number in case of an order type 'YYYY' .


External batch number adding date should work for only 'XXXX' order type .

cuserspbpsdesktopyyyy-order-type.jpg

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

2 Answers

Rakshith Gore
Apr 11, 2017 at 09:32 AM
0

Hi Priya,

I didnt find a way to handle this requirement using some configuration, So i am providing you the alternate solution so that the requirement can be achieved.

The pushbutton 'Create Batch' gets greyed out during the display mode, The logic is it checks the function codes in the internal table FTABEXL[]. So you just need to populate the function code to this internal table during the change or create mode.

The internal table FTABEXL[] gets populated in the FM CO_ZF_BUILT_FCODE_EXCL_TAB, where you can make use of the explicit enhancement point ENHANCEMENT-POINT lcozfu30_00 SPOTS es_saplcozf to populate the fcode CHHZ to FTABEXL[].

Thanks & Regards,

Rakshith Gore

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Rakshith ,

Thanks for your answer .

I tried creating implementation in es_saplcozf , and wrote code like move CHHZ to FTABEXL[].

it says FTABEXL is not defined in as DATA , syntax error .

can you suggest further .

0

No, the FTABEXL[] is available in the main program. The FM has the parameter something called EXCL_TAB[] i dont remember exact name. You need to populate that internal table.

Thanks & Regards,

Rakshith Gore

0

No, the FTABEXL[] is available in the main program. The FM has the parameter something called EXCL_TAB[] i dont remember exact name. You need to populate that internal table.

Thanks & Regards,

Rakshith Gore

0
priya ramani Apr 12, 2017 at 08:05 AM
0

Hi Rakshith ,

am doing

IF sy-tcode = 'CO01'.
move fc_CHHZ to EXCL_TAB-fcode.
ENDIF.


still in CO01 create button for batch is not greyed .

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

EXCL_TAB[] is an internal table, so you must APPEND the data to EXCL_TAB[].

Thanks & Regards,

Rakshith Gore

0

Hi Rakshith ,

Its greyed out for Co01 or CO02 as per my code .

Thanks ,

But it is getting greyed out for all order types :)

I wanted to greyed out to only one particular order type .

0