cancel
Showing results for 
Search instead for 
Did you mean: 

Data dictionary check problem(DdTypeString.checkValid), please help

Former Member
0 Kudos

Hi, I am creating a Web Dynpro Java application but having trouble when calling BAPI RFC Model.

I want to get 1 attribute from an output data structure, but I am getting exception before I can reach the data. It says:

-


com.sap.dictionary.runtime.DdCheckException: Character string "" does not exist in the set of allowed values

at com.sap.dictionary.runtime.DdTypeString.checkValid(DdTypeString.java:311)

com.sap.tc.cm.base.exception.BaseModelRuntimeException: Attribute value is not valid for attribute 'Currency' of model class 'cn.com.cmbc.relatedmodels.get_org_detailmodel.Zbp_Org_Detail'

The Currency is a tructure from the data model and "" is not in the value dictionay. But This could happen when there is not result or the return data which currency is "" because we are not using it which is an optional input.

How can I get around this exception and get 1 attrubute within the structure when Currency is "" ?

Many Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Duplicated post due to lag

Edited by: Gsheng on Sep 12, 2009 8:47 AM

Former Member
0 Kudos

Hello Gsheng,

I am facing the same problem now.

Is there a solution for it. ?

Please reply back ASAP.

Thank you.

Best Regards,

Poornima HG

Former Member
0 Kudos

Thank you, Gourav.

That is an option but adding extra work to our RFC team. I am looking for a way dealing it within Web Dynpro. It will be the best if there is an option configure JCO to make it not checking dictionary. This what ABAP doing. SAP should make them matched.

Former Member
0 Kudos

Are you getting result back for attribute currency? It seems it is mandatory in this case (usually it does). So if output is not populating any values in output structure then you will face this issue.

Regards,

Gourav

Former Member
0 Kudos

It happened because records have Currency as "". The big problem is the BAPI itself is running with NO PROBLEM in ABAP. In ABAP, the return structure gives all data even Currency is "" without even warning. ABAP programmers refused to change anything because they don't think it is their problem.

So any other way except changing ABAP dictionary or changing BAPI to set defualt value within dictionary?

Former Member
0 Kudos

Hi,

"currency" is mandatory if amount is used.

What you can do is just capture this issue as "catch" block and assign default value to currency field, like "USD", "EUR", "GBP" etc.

It is possible some other BAPI field has currency value use that filed to assign value for currency and treat this as "known bug" in your service.

Regards,

Gourav

Former Member
0 Kudos

Thanks for very suggestful reply.

Where can I catch it before it throws me an exception?

Former Member
0 Kudos

Hi,

another possible way is to create wrapper RFC for this BAPI which can be exposed as service and you can consume that service. Assign default value to "currency" field if it return nothing.

or

create composite service in CAF and assign default value there and then consume in Dynpro.

I belive it is difficult for you capture it as it is throwing exception even before reaching to data value. but try with CAF composite services and this may help.

Regards,

Gourav