cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Create with Reference

Former Member
0 Kudos

Hi Experts,

I would like to ask if there is any document / any way to create a custom business object with reference.

E.g. In AccountTI, I created an EC which contains a Table of my CustomBO.

[AlternativeKey] element ID                     :ID;                              

                               element CustomerID  :BusinessPartnerInternalID;

etc.

In this EC, there is a button "New CustomBO" and it calls the Quick Create of CustomBO.

I would like to fetch the data from AccountTI (AccountID) to CustomerBO.CustomerID so that whenever I click on the new button in EC, the CustomerID is set as default.

Many thanks for your help

Best regards

Linh

Accepted Solutions (0)

Answers (1)

Answers (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Linh,

Did you take a look at this document?

HTH,

    Horst

Former Member
0 Kudos

Dear Horst,

thank you for your reply. I just try the list modification function but it doesnt work because in my case, the embedded component is bindet with a standard BO Customer and the DataList is bindet with a custom BO.

I can only bind the modified structure with Customer or children of the Customer BO.

Although it doesn't solve my problem but it was nice to know a new functionality.

Thanks again

Best

Linh

umehring4cloud
Participant
0 Kudos

Hi Linh,

If I understood it right, you have an EC bind to the CustomerBO. There you have a list of your custom BOs and a New button that opens a quick create - where you want to have the CustomerID of that CustomerBO as default ID of your custom BO.

Did you try passing the CustomerID to the quick create UI? Your create handler can first make the BO operation Create and then - as second step - do a DataOperation with operation type assign. There you put the CustomerID from the parameter in the ID field of your custom BO.

Hope that helps,

Uwe

Former Member
0 Kudos

Hi Uwe,

yes I tried it with parsing the value through an outport from the EC to the inport of the QC but somehow the value did not go through.

Idk why...

Best

Linh

umehring4cloud
Participant
0 Kudos

Hi Linh,

Sorry to read that. Maybe you can try to find out when the value is being list. To do so, you can "use" Message boxes. Just put a message box in all involved event handlers e.g. OutportHandler of EC, InportHandler of QC and so on, and show the value of the parameter in the box. Maybe this helps you analyse the issue.

Best regards,

Uwe

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Linh,

Did you do all steps:

  • OutPort:
    • Map the CustomerID to the OutPort parameter
  • InPort:
    • Map the InPort parameter to a parameter in your DataModel parameter
    • Trigger an Event Handler
  • Event Handler
    • Use the DataMode parameter for Retrieve

Bye,

   Horst

Former Member
0 Kudos

Hi Horst,

many thanks for your support. I am able to parse the value to the QC however in QC, the field I wanted to link to is an OVS and after that field (AccountID) is set, there are following events occured for association (if this.AccountID.IsSet() then association ToAccount will be created).

In the standard solution I saw that there is a port named CreateWtRef (/SAP_BYD_UI/SystemPortTypes.PTP.uicomponent) but I don't know how to use it.

Do you have any idea?

Best

Linh

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Linh,

If the QC is your own, you have control over the events.

So what's exact the case now?

Bye,

  Horst

Former Member
0 Kudos

Hi Horst,

could you please give me an example of how I should configure the event?

This is what I did:

From the inport --> event onfire --> DefaultAccountEvent

DefaultAccountEvent. has the operation script:

$data.ZCustomBO.CustomerID = $data.Inport.AccountID;

In the UI I can see the result but the OVS is not working either for CustomerID as well as all other fields which use OVS.

And when I click enter there is a dump saying that there is something wrong with the operation.

Thank you and hope to hear from you

Best

Linh

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Linh,

You don't need a script (it won't run on mobile)

If you are able to have the AccountID in the inport parameter you can use the EventHandler for a Data Operation in which you transfer the ubound inport element to the bound CustomerID element.

This should not interfere with any OVS binding.

HTH,

    Horst

Former Member
0 Kudos

Hi Horst/Linh,

Could you please share screenshots on how did you achieve this scenario ,

as we are also trying to populate some values from opportunity header to custom BO Quick Create .

but we are unable to achieve this even after binding inport of EC to standard outport.

please find below illustration and screenshots of the implementation we tried:-

We added an embedded component with custom contract tab/Pane on standard opportunity object.

and we are retrieving related contracts to opportunity, and providing New Contract button to add new one.

but want to show some fields from opportunity header in custom contract QC.

steps followed to achieve :-

1. Created an Inport for Opportunity ID,Opportunity name and binding it to dummy data field created in data model of EC.

2.Used standard outport of opportunity and binding the opty id n opty name to inport elements.

Now how could we pass the value of fields in data model to our custom quick create elements?

i have attached screenshots for your reference, if you could notice the missing component or binding.

it would be a great help.

Thanks.

Bhupinder

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Bhupinder,

You should never ever map a single value to a list.

Map the data form the Inport ParameterBinding to fields of a structure of your data model.

These fields should be bound (= typed) to the resp. BO elements.

Then you can use e.g. the OpportunityID as AlternativeKey for a Retrieve call.

HTH,

    Horst