cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Custom Fiori App for Manage Purchasing Info Record using Developer Extensibility

ayechan
Explorer
0 Kudos
244

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.

ayechannyeinko_0-1707188273490.png

So, it is ok if fixed value is used in the logic by adding leading zeros up to length 10.

ayechannyeinko_1-1707188317960.png

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.

ayechannyeinko_2-1707188537221.png

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.

ayechannyeinko_3-1707188585097.png

ayechannyeinko_4-1707188609339.png

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

 

 

 

 

 

View Entire Topic
varunvenkat
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Aye,

according to the documentation of the developer extensibility BO interface, you should receive the system generated purchasing info record number upon creation:

varunvenkat_0-1723062884151.png

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