on 03-19-2007 3:56 AM
hi experts.
i m workin on crm domain and faching problem to pass value from one stucture to another . problem is that i want the output in xml file so i need all the values interm of segment.
initialy i have this structure.
DATA: BEGIN OF struc1 occurs 0,
ST_ORDERADM_H TYPE CRMT_ORDERADM_H_WRKT,
ST_PRICING TYPE CRMT_PRICING_WRKT,
ST_ORGMAN TYPE CRMT_ORGMAN_WRKT,
ST_PARTNER TYPE CRMT_PARTNER_EXTERNAL_WRKT,
END OF struc1.
and using fm CALL FUNCTION 'CRM_ORDER_READ' i got values on this structure at run time.
MOVE LT_ORDERADM_H to STRUC1-ST_ORDERADM_H.
MOVE LT_ORGMAN to STRUC1-ST_ORGMAN.
MOVE LT_PARTNER to STRUC1-ST_PARTNER.
MOVE LT_PRICING to STRUC1-ST_PRICING.
and after that using
try.
CALL TRANSFORMATION id
SOURCE data_node = STRUC1
RESULT XML xmlstring.
CATCH cx_st_error.
endtry.
CLEAR: tab_xstring,
lv_filename,
lv_path,
lv_fullpath,
lv_user_action.
REFRESH: tab_xstring.
lv_bytes = XSTRLEN( xmlstring ).
IF lv_bytes > 0.
lv_xstring = xmlstring.
DO.
APPEND lv_xstring TO tab_xstring.
lv_xcnt = XSTRLEN( lv_xstring ).
IF lv_xcnt > xsize.
lv_xstring = lv_xstring+xsize.
ELSE.
EXIT.
ENDIF.
ENDDO.
now it convert to xml file .
problem is it gives me value of all field associated with standared structure.
but client requirment is that he want only selected values of given structure.
so i think i make a new structure for given value but i m not able to get values in new structure.
thanks
Hi,
create a structure in se11 with following fields
ST_ORDERADM_H.
ST_ORGMAN.
ST_PARTNER.
ST_PRICING.
for example as STRUCT2.
data : begin of i_struct2 occurs 0.
include structure struct2.
data : end of i_struct2.
MOVE LT_ORDERADM_H to i_STRUCt2-ST_ORDERADM_H.
MOVE LT_ORGMAN to i_STRUCt2-ST_ORGMAN.
MOVE LT_PARTNER to i_STRUCt2-ST_PARTNER.
MOVE LT_PRICING to i_STRUCt2_PRICING.
then
try.
CALL TRANSFORMATION id
SOURCE data_node = i_STRUCt2
RESULT XML xmlstring.
CATCH cx_st_error.
endtry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then,
there is a function module for this but im not very sure.. you may want to find it out by using CONVERT_TO_XML_FORMAT along with *
aRs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.