cancel
Showing results for 
Search instead for 
Did you mean: 

LanguageCode data type

Former Member

Hello experts,

I am trying to create a Language dropdown as part of my customization on the Cusotmer BO. I need a new field where we could specify the Customer's langauge for communication. When I try to create this field I get an error.

"Error    3    Definition of data type 'LanguageCode' not found. Add an import statement for the missing namespace or use a fully qualified name."

Here is how my code looks like

import AP.Common.GDT as apCommonGDT;

import AP.FO.BusinessPartner.Global;

[Extension] businessobject AP.FO.BusinessPartner.Global:Customer raises MsgERPData, MsgERPData_FI, MsgIndividualCustomer, MsgIndividualCustomer_FI {

        // You must activate this business object before you can access the extension fields

        // or messages in script files, forms, and screens.

       

           node AddressInformation {

           }

   

        message MsgERPData text "Fill mandatory data required for promoting the Prospect to Customer";

             

        node Common {

               

       

        [Label ("Language")] element KNA1_LANGU:LanguageCode;

        [Label ("E-mail")] element ADR6_SMTPADDR:LANGUAGEINDEPENDENT_EXTENDED_Text;

        //[Label ("Region")] element KNA1_REGIO:LANGUAGEINDEPENDENT_EXTENDED_Text;

Should it be possible to use this datatype or should we create a custom codelist for this?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member201819
Participant

Hey Vikram,

the data type "LanguageCode" is not located in the namespace AP.Common.GDT.

If you import the namespace BASIS.Global in your BODL-File you should be able to use it.

You can look up the namespaces of data types in the Repository Explorer (menu "View") by switching to the top menu tab "Data Types" therein.

Unfortunately, the BODL-Editor doesn't provide code-completion to find the according namespace to the entry in the RepositoryExplorer, but the ABSL-Editor does. So if you do not find a namespace path just open any ABSL-Script, type "import " and hit CTRL+SPACE and you can browse all avalable entries.

If a data type exists in multiple namespaces (and you imported these), it can sometimes be neccessary to explicitly define the path, e.g. "element userSelectedLanguage :BASIS.Global:LanguageCode";

Kind Regards
Pablo

Former Member
0 Kudos

Hello Pablo and Fred,

Thanks for your responses. There is two issues and may be this could be that I am using C4C repository and not ByD.


Fred - I do not see the namespace you mention available for import. I only see AP.PDI.bo and not the one you mention.

Pablo - I am able to include the import statement but then the error appears "Definition of namespace BASIS.GLOBAL not found

Former Member
0 Kudos

Hello Pablo,

   Your response did fix our problem. The issue was that we are having a currency field which was duplicating between the BASIS and the AP.Common.GDT. So this was giving me an error before I specified the currency field from one particular name space. This is solved now for us.

0 Kudos

Thanks Pablo.

former_member200567
Active Contributor
0 Kudos

Hi, Vikram

   You need to import this.

  import  AP.PDI.ABSL;

You can find which NameSpace you have to import in Repository Explorer in the Cloud Applications Studio.

Regards,

Fred.