Skip to Content
0

Hopw to fetch the data through ID from another Business Object ?

Nov 18, 2016 at 05:45 AM

82

avatar image
Former Member

I am created 2 BO.

1.Customer_details

2.SearchProg.bo

I want fetch the data through id from Customer_details

Customer_details.bo

import AP.Common.GDT as apCommonGDT; import AP.FO.BusinessPartner.Global; businessobject Customer_details { [AlternativeKey] element Customer_Id:ID; element Customer_Name1:Name; element Customer_Add1:AddressTypeCode; association ToSearchProg to SearchProg; }

SearchProg.bo-

businessobject SearchProg { element Customer_Id2:ID; element Customer_Name2:Name; element Customer_Add2:AddressTypeCode; }

In Script Level of SearchProg.bo-

var obj; var RetriveData:Customer_details.Customer_Id; obj = Customer_details.Retrieve(RetriveData); //RetriveData.Contains="1"; this.Customer_Name2 = obj.Customer_Name1; this.Customer_Id2 = obj.Customer_Id; this.Customer_Add2 = obj.Customer_Add1;

I tried ,Bt it's not coming the data on screen and it gives some Incidents.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Pradeep Kumar N
Nov 21, 2016 at 12:44 PM
0

Hi Nihar,

Before assigning check if obj is not initial , obj.IsInitial();

Thanks, Pradeep.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 22, 2016 at 08:41 AM
0

Thank you so much.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 22, 2016 at 08:45 AM
0

Hi Pradeep,

How to find , the technical Id of sales order on screen lable?Can you Ping me .

Thanks & Regards

Nihar

Share
10 |10000 characters needed characters left characters exceeded
Pradeep Kumar N
Nov 22, 2016 at 11:25 AM
0

Hi Nihar,

You could go to Repository explorer in the studio and select the BO:

https://answers.sap.com/questions/66647/how-to-know-technical-name-for-salesorderid-in-sal.html

Thanks, Pradeep.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Nov 23, 2016 at 06:12 AM
0

Hi Pradeep,

With a very good morning.I knew that you sent,Id is the technical name of Sales Order Id.

But, If that Id is not present in the Repository explorer,then how to find the sales order Id in technically by the use of Debugging.please heme me out.ping me.

thanks

Nihar

Share
10 |10000 characters needed characters left characters exceeded