无法创建消息:只能为默认语言" EN"创建消息内容。

2020-08-27 06:31发布

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


您好,亲爱的专家,

能帮我吗。我尝试使用端点/sap/opu/odata/sap/API_MKT_CAMPAIGN_MESSAGE_SRV/带有提供的JSON的消息创建新消息,并收到400条消息"消息内容只能为默认语言创建" " EN"。" 您有可用于创建新消息的数据示例吗? 还是您知道我的数据出了什么问题?

JSON:

 {
   " MessageName":" stringstringstring2",
   " MarketingArea":" CXXGLOBAL",
   " DefaultLanguage":" EN",
   " IsTemplate":否,
   " MessageContents":{
     "结果":[
       {
         " MessageBlocks":{
           "结果":[
             {
               " BlockType":" TEXT",
               " MessageBlockContents":{
                 "结果":[
                   {
                     " BlockContentConditionName":"",
                     " BlockContentHTMLString":"某事",
                     " BlockPosition":0,
                     " BlockContentType":" TEXT",
                     " BlockContentStyleClasses":"",
                     " BlockControl":"",
                     " BlockControlName":""
                   }
                 ]
               }
             }
           ]
         }
       }
     ]
   }
 } 

错误:

 {
   "错误":{
     "代码":" CL_API_MKT_CPG_MSG/011",
     "信息": {
       " lang":" en",
       " value":"只能为默认语言" EN"创建消息内容。"
     },
     "内部错误":{
       "应用程序":{
         " component_id":" CEC-MKT-API",
         " service_namespace":"/img/SAP/",
         " service_id":" API_MKT_CAMPAIGN_MESSAGE_SRV",
         " service_version":" 0001"
       },
       " transactionid":" ",
       " timestamp":"",
       " Error_Resolution":{
         " SAP_Transaction":"",
         " SAP_Note":"请参阅SAP Note 1797736进行错误分析(https://service.sap.com/sap/support/notes/1797736)"
       },
       "错误详情": [
         {
           "代码":" CL_API_MKT_CPG_MSG/011",
           " message":"只能为默认语言" EN"创建消息内容。",
           " propertyref":"",
           "严重性":"错误",
           "转换":false,
           " target":""
         }
       ]
     }
   }
 }
 

(246.7 kB)

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


您好,亲爱的专家,

能帮我吗。我尝试使用端点/sap/opu/odata/sap/API_MKT_CAMPAIGN_MESSAGE_SRV/带有提供的JSON的消息创建新消息,并收到400条消息"消息内容只能为默认语言创建" " EN"。" 您有可用于创建新消息的数据示例吗? 还是您知道我的数据出了什么问题?

JSON:

 {
   " MessageName":" stringstringstring2",
   " MarketingArea":" CXXGLOBAL",
   " DefaultLanguage":" EN",
   " IsTemplate":否,
   " MessageContents":{
     "结果":[
       {
         " MessageBlocks":{
           "结果":[
             {
               " BlockType":" TEXT",
               " MessageBlockContents":{
                 "结果":[
                   {
                     " BlockContentConditionName":"",
                     " BlockContentHTMLString":"某事",
                     " BlockPosition":0,
                     " BlockContentType":" TEXT",
                     " BlockContentStyleClasses":"",
                     " BlockControl":"",
                     " BlockControlName":""
                   }
                 ]
               }
             }
           ]
         }
       }
     ]
   }
 } 

错误:

 {
   "错误":{
     "代码":" CL_API_MKT_CPG_MSG/011",
     "信息": {
       " lang":" en",
       " value":"只能为默认语言" EN"创建消息内容。"
     },
     "内部错误":{
       "应用程序":{
         " component_id":" CEC-MKT-API",
         " service_namespace":"/img/SAP/",
         " service_id":" API_MKT_CAMPAIGN_MESSAGE_SRV",
         " service_version":" 0001"
       },
       " transactionid":" ",
       " timestamp":"",
       " Error_Resolution":{
         " SAP_Transaction":"",
         " SAP_Note":"请参阅SAP Note 1797736进行错误分析(https://service.sap.com/sap/support/notes/1797736)"
       },
       "错误详情": [
         {
           "代码":" CL_API_MKT_CPG_MSG/011",
           " message":"只能为默认语言" EN"创建消息内容。",
           " propertyref":"",
           "严重性":"错误",
           "转换":false,
           " target":""
         }
       ]
     }
   }
 }
 

(246.7 kB)
付费偷看设置
发送
2条回答
悠然的二货
1楼-- · 2020-08-27 07:01

谢谢! 可行!

还有一种更简单的方法来创建带有内容的消息:

 {
 " MessageName":"字符串",
 " MessageType":" EM",
 " MarketingArea":" CXXGLOBAL",
 " DefaultLanguage":" EN",
 " MessageContents":{
 "结果":[
 {
 " LanguageCode":" EN",
 " MessageContentHTMLString":" <!DOCTYPE html> \ n                                                                     
大简至美
2楼-- · 2020-08-27 06:42

嗨,Sergei,

在MessageBlocks之前添加" LanguageCode":" EN"。 应该可以。

致谢Radim

 {
   " MessageName":" stringstringstring2",
   " MarketingArea":" CXXGLOBAL",
   " DefaultLanguage":" EN",
   " IsTemplate":否,
   " MessageContents":{
     "结果":[
       {
       " LanguageCode":" EN",
         " MessageBlocks":{
           "结果":[
             {
               " BlockType":" TEXT",
              
               " MessageBlockContents":{
                 "结果":[
                   {
                     " BlockContentConditionName":"",
                     " BlockContentHTMLString":"某事",
                     " BlockPosition":0,
                     " BlockContentType":" TEXT",
                     " BlockContentStyleClasses":"",
                     " BlockControl":"",
                     " BlockControlName":""
                   }
                 ]
               }
             }
           ]
         }
       }
     ]
   }
 }


 

一周热门 更多>