on ‎2023 Jan 06 4:33 PM
Hi All,
I am developing a Purchase order based app and using Draft functionality . This app has Non GUID based logic based on below blog :
I am facing an issue while creating Purchase Order and items :
1. During header Field population, Control comes in method METHOD earlynumbering_create and entry is created in Draft Header table.
2. When I click on Item Create, control fails to come to method earlynumbering_create. ALso, I found that method clean up is the only common method getting triggered while creating items.
Due to this I have blank Item number for PO and from second Line item creation , dump appears.
Kindly suggest .
Request clarification before answering.
Hi Snehal,
Please enable early numbering in the behavior definition of the item entity and then add the quick fix to add the suggested method to your behavior implementation handler class of the item entity.
OR
Another solution is to generate the item numbers during determination on create.
determination genarate_item_no on modify { field item_no ; create; }
Thanks,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Snehal,
Early numbering needs to be defined in behavior definition for both header & item entity and the RAP framework will provide you the separate hook methods for early numbering for create of header & create by association for Item then you may implement it for drawing numbers for the key fields.
Sample hooks methods for early numbering:
METHODS earlynumbering_create FOR NUMBERING
IMPORTING entities FOR CREATE Header.
METHODS earlynumbering_cba_Item FOR NUMBERING
IMPORTING entities FOR CREATE Header\_Item.
Thanks,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Thanks for the reply. I tried the solution mentioned above. I am not able to get \_Item association option method EARLY_NUMBER_CBA_ITEM. It only allows header CDS view in class method definations :
METHODS earlynumbering_cba_Item FOR NUMBERING
IMPORTING entities FOR CREATE Header\_Item.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.