cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new fields to Change Request screen and saving data into custom table

former_member609120
Contributor
0 Kudos

Hi All,

I am new to MDG and working on my first requirement which is as below

When we create change request, on that screen I need to add two custom fields

I need to update the data entered in these custom fields into a Z table along with some standard fields. The updation needs to happen in create and change mode.

This data has to reflect in LFA1 as well.

BP_VENGEN is the entity.

Can anyone please guide me with steps/links to achieve this functionality - how to add fields.

Also where do I write the code for saving data into my z table. Any sample code too would be appreciated.

Thanks in advance.

Regards,

Vanessa

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos

Hi Vanessa,

   Adding to the above reply, I would like to provide you a brief steps on how can you achieve this:

  1. Initially, you have to add the two new attributes in the respective entity of the data model.
  2. Secondly, You have to create a new UI configuration for the specific data model.
  3. Going forward you have to add new UIBB's, melting group and pull the new fields into the UIBB screen. The new fields are populated automatically using the feeder class. So don't worry
  4. Save and activate the UI configuration.

Well, stating in 4 points I understand its a bit hard but the process would be the same.

Regards,

Pavan

former_member609120
Contributor
0 Kudos

Hi Pavan,

   Thanks for the guidance. I was able to add my fields to the Change Request screen.

Can you guide me where do I write logic to update my custom table when user clicks Save and Submit..I need BADIs for both the buttons. Also in these BADIs, would the runtime data be available in some structure or do we have any FMs to fetch the runtime data? My requirement is to update data of my new fields along with CR fields into another custom table when user clicks Save and update the same record when Submit is pressed.

Thanks in advance.

Regards,

  Vanessa

Former Member
0 Kudos

Hi Vanessa

I guess as you are using MDGS ( Reuse Data Model) you need to perform SMT mappings also as per below link

Service Mapping Tool (SMT) - SAP Help Portal

But before that your custom table must exists in ECC and need to append Target Structure with custom fields also.

former_member609120
Contributor
0 Kudos

Hi Sanjay,

Yes i have referred to SAP pdf for extending MDG-S using Reuse option. I have also done SMT mapping as per the steps in that document. My requirement is the custom table exists in MDG itself and when user create a change request for the supplier, he enters data in the screen along with my fields. Once he clicks Save, data from my fields and SAP fields need to be stored into a custom table ZMD_TEST for example. He may change the value of some fields including mine and then click Submit, at this time, again the earlier record needs to be updated with the new values.

I am looking for places or solutions where to write code so that I can save date into this Z table when user clicks Save and Submit. Can you please guide me on the same.

Thanks and Regards,

  Vanessa

Former Member
0 Kudos

Hi Vanessa

Are you mean to say that you want two tables one for save button and one for Sumbit button?

Then what is use of goverance process here? Revevier can always update any value so that it will update previous value from your MDG custom Table..

former_member609120
Contributor
0 Kudos

Hi Sanjay,

Sorry I do not understand the MDG framework too much yet. Let me explain to you my requirement in a better way.

When the user is processing the CR at times he will need to call Supplier for clarifications. We need to capture the time taken for clarifications and the clarification reasons in order to understand the data issues and improve the governance processes in future.

Hence we will create one custom table in MDG to store the above information

We are going to add 2 fields

CR Status

Query Reason

1. Suppose user needs some clarification, he selects CR Status - In Query and Reason - Need bank information and clicks SAVE. At this time, our custom table needs to be updated with CR No. Type, Step, Vendor No., Query Open Date-Time and Reason

2. User get the clarification, fills in all the information and now selects CR Status - Closed. At this time, the record created for step 1. needs to be updated with the Query Close Date and Time.

I have added the 2 fields on the Change Request screen and when I save, I see data going into temporary tables. Havent yet tested the Submit to check if LFA1 and BUT000 are updated. Having some system issues.

I basically have no idea where to implement logic to save data into the custom table.

Thanks and Regards,

Vanessa

Former Member
0 Kudos

Hi Vanessa

MDGS follow below goverance process for SAP out of Box delivered workflow templlate

  1. Requestor Check and sumbit CR or it can save CR as draft and submittes only after final clarification.
  2. Finance reviewer can also update companyb code data i\f needed and approves.
  3. Procurement reviewer can also update purchase data i\f needed and approve.

Step 2 and 3 can be done in parallel

  1. Finance approver can Approve /Reject data (No updates)
  2. Procurement approver can Approve /Reject data (No updates)

So as per your requirement you can hold CR in step 1 or 2/3 also.It updates latest value also in MDG table 

former_member609120
Contributor
0 Kudos

Hi Sanjay,

Thank you for this explanation. As per your steps, my requirement is when Step 1 is happening, I need updates to be made to another custom table. Standard tables updation will be taken care by the mapping done.

do we have BADIs/classes in MDG that trigger on Save/Submit of a CR?

Thanks and Regards,

Vanessa

Former Member
0 Kudos

No std BADI. If you want you can create custom BADI for this.

former_member609120
Contributor
0 Kudos

Ok so creating a custom BADI is the only solution. Or do you suggest any other solutions?

How do I assign my custom BADI to trigger on Save/Submit buttons?

Former Member
0 Kudos

Take help of Abaper, I am not sure but you may find any method for triggering event

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vanessa

It is possible. For this you need to add custom entity type in DM, Define relationship,Update UI as per below