Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

SAP Gateway and SPI - adding extra fields to data model on Gateway side

$
0
0

Hello guys,

 

I have followed this tutorial How To Create SAP NetWeaver Gateway Service for SPI So far so good.

 

Now I have a problem that after some reading I still can't fixed so far.

 

One of the entities have a raw string field with the customizing fields, and I need to decoupled that in the specific fields. I am talking specifically of field EXT_ATTIRB of structure /plmb/s_ecr_hdr_sp . This structure has 48 fields, and therefore the data model will have 48 "Properties" for the "Header" Entity Type .

 

EXT_ATTRIBTypes/PLMB/SPI_XSTRINGRAWSTRING00

Generic Parameter as XSTRING

 

My question is: how can I add fields to the data model (lets say for instance ZZWBS and ZZWBS_NAME) so later I can in the Extension class redefine the methods and populate with correct content this 2 ZZ fields.

 

If I try to add the fields to the properties of this specific entity(getting then 50 properties) I will get an error when I run a GET saying that "Property 'ZZWBS' of data object 'ECR_HEADER' has no Internal type assigned". Even after generating runtime objects it seems that the model just recognize the 48 properties (saw that debugging the method  /IWFND/IF_MGW_REQUEST_MANAGER~READ_ENTITY -> er_entity = mo_model_access->get_data_structure_from_model)

 

How can I overcome this problem? I don't want to make an append to the /plmb/s_ecr_hdr_sp structure with this fields, because then the info will be duplicated in the ZZ fields and the EXT_ATTRIB.

 

I will be grateful for all the help.


Viewing all articles
Browse latest Browse all 2823

Trending Articles