on 2024 Feb 06 3:05 AM
Dear Experts,
I would like to create custom Fiori app for Manage Purchasing Info Record app of S4Hana cloud using Developer Extensibility (CDS views of Eclipse ABAP development tools).
And there are some difficulties encountered in developing this custom Fiori app.
1. "Supplier does not exists" error keeps occurring if the value selected from the custom app is used because it only has length 8.
Standard value length of Supplier field is 10.
So, it is ok if fixed value is used in the logic by adding leading zeros up to length 10.
Is there any entity that have length 10 automatically in CDS Views or is there any way to fix this error?
In metadata extension, I used the following entity and entity name for this selection.
2. Although creating Purchasing Info Record using custom Fiori app is ok, updating is not ok because from ABAP logic, I cannot get Info Record Number that is system auto-generated.
I need to use this Info Record Number as key in Update Entity ABAP logic.
So, I would like to ask that if is there any way to update Purchasing Info Record without using Purchasing Info Record Number or is there any way (logic) to get Purchasing Info Record Number?
If there is any unclear point in my questions, please ask me for details.
Thank You.
Best Regards,
Aye Chan
Hi Aye,
according to the documentation of the developer extensibility BO interface, you should receive the system generated purchasing info record number upon creation:
Would it not be an option to store this returned info record number locally in some form (for example, in a table with a suitable primary key such as "Material | Supplier | Info Record Category | Info Record Number" .
Then, when you then need to update a particular info record, you can use the necessary input parameters to fetch the exact info record, after which you can perform the update operation.
Alternatively, you could also look into using the CDS View I_PurchasingInfoRecordApi01 or C_PURCHASINGINFORECORDDEX to fetch the required info record with a simple logic such as the following:
SELECT Single PURCHASINGINFORECORD
WHERE Material = 'X'
AND Supplier = 'Y'
INTO lv_pur_info_record.
Hope this helps!
Best regards
Varun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
10 | |
9 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.