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

Output entity not getting displayed if not sent in input request.

$
0
0

Hi experts,

 

I have created a service which has 3 entities.

 

     DeliveryHeader

 

     DeliveryItems

 

     StatusOutput

 

    

     Association has been defined for DeliveryHeader and  DeliveryItems.

    Also between DeliveryHeader and OutputStatus.

 

    My input request message is:

 

    {

       "DN_No" : "123",

       "ShipTo" : "CNZ",

 

        "DeliveryItems" : [{

           

        "DN_No": "123",

        "Item_No": "1",

        "Quantity": "10'

       }]

  }

 

But in my output StatusOutput is not getting displayed.

 

However if I send blank StatusOutput in my input message then I can see it in output as well.

 

{

        "OutputStatus" : {   <---- Blank output sent in input

             "Code" : ""

          },

 

       "DN_No" : "123",

       "ShipTo" : "CNZ",

 

        "DeliveryItems" : [{

           

        "DN_No": "123",

        "Item_No": "1",

        "Quantity": "10'

       }]

  }

 

Why is this so? How can I correct my code so that i get the OutputStatus in my output without sending the same in the input?

 

In my create_deep_entity I have coded like this:

 

TYPESBEGIN OF t_output.

           TYPES: StatusOutputTYPE ycl_prj_create_dn_mpc_ext=>TS_STATUSOUTPUT,

          END OF t_output.


x_output-StatusOutput-code = "100".

x_output-StatusOutput-text = "Successfully created DN".


    copy_data_to_ref(

       EXPORTING

         is_data = x_output

       CHANGING

         cr_data = er_deep_entity ).


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>