on 08-12-2014 7:08 AM
Hi experts
I want to create odata service to read individual and corporate account, for this I have created one remote enabled FM but where i used import parameter an Partner number and in export i hav created custom structure with multiple fields and again structure. But in service builder it showing error 'deep structure is not allowd' how can i resolve this error.
Hello Faseeh,
Your FM has 2 different output structures is it ? or 2 different output tables ?
You can implement following ways :
1. If your FM has only 2 different output structures then you can make use of ComplexTypes.
2. If your FM has 2 different output tables then use Expand_Entity/Expand_Entity_Set accordingly as per your needs ( Association & Navigation i.e., $expand )
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashwin,
My fm have one output table type which have again line type structure in this structure i defined different field related to account but for multiple access of phone,fax and email field again I have given table type this i can access by looping table.This is successfully giving me output in se37 but its giving me trouble in service builder.
Thanks In advance.
Hello Faseeh,
As per the screen shot its a nested structure.
I would suggest the below way of implementation as per best of my understanding :
For an instance lets assume you are sending Business_Partner Number say 10000 as input to get all the details of that particular Business_Partner which u have shared in the screen shot.
1. Create Parent Entity say BP_NUM which has the input Business_Partner Number.
2. Create Child Entity say BP_DETAIL which has got all the fields apart from PHONE , FAX & EMAIL tables.
3. Create Child Entity say PH_DETAIL which has got all the fields related for PHONE details of BP only.
4. Create Child Entity say FAX_DETAIL which has got all the fields related for FAX details of BP only .
5. Create Child Entity say EMAIL_DETAIL which has got all the fields related for EMAIL details of BP only.
Now Create Association and Navigation as follows :
BP_NUM to BP_DETAIL - 1 to 1
( assuming response of your FM will have one business partner as output and corresponding details for FAX, PHONE & EMAIL tables )
BP_NUM to PH_DETAIL - 1 to N
BP_NUM to FAX_DETAIL - 1 to N
BP_NUM to EMAIL_DETAIL - 1 to N
Implement Expand_Entity and pass BP Number as key ( assuming your FM will take a particular BP Number and returns all the details which u have shared in the screen shot ).
Refer the below for technical details.
Create a deep structure and as a response return the corresponding tables accordingly by sending back navigation properties correctly to the expand clause.
Regards,
Ashwin
Hi,
This is correct as the structure must be flat instead of nested.
Guidelines for output parameters
- The output parameter must be a table.The fields in the table must be flattened and mapped to the root DATA object.
- The output table must contain the input fields.
- Only one table can be mapped as an output table.
- Nested tables are not allowed.
Reference - https://help.sap.com/saphelp_gateway20sp06/helpdata/en/98/0d7b12e6db4d1581fd5fdfb05f129e/content.htm
But there are ways you can achieve the functionality by association, navigation etc.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.