ABAP Outbound Proxy with multiple entries
I have message type as follows.
MT_Proxy_Matmas_out -- DT_Proxy_Matmas_out
Matnr 1..unbounded
Material_Num 1..1
Material_Dec 1..1
Message Inrerface: MI_proxy_Matmas_out.
Generated Proxy has following objects.
1. Class ZMCO_MI_PROXY_MATMAS_OUT Proxy Class (generated)
2. Structure ZMDT_PROXY_MATMAS_OUT Proxy Structure (generated)
3. Structure ZMDT_PROXY_MATMAS_OUT_MATNR Proxy Structure (generated)
4. Structure ZMMT_PROXY_MATMAS_OUT Proxy Structure (generated)
5. Table Type ZMDT_PROXY_MATMAS_OUT_MATN_TAB Proxy Table Type (generated)
Report Program ZB_Matnr_xport.
DATA: prxy TYPE REF TO ZMCO_MI_PROXY_MATMAS_OUT.
DATA: i_data_records TYPE TABLE OF ZMDT_PROXY_MATMAS_OUT.
DATA: wa_data_records TYPE ZMDT_PROXY_MATMAS_OUT.
DATA: it type ZMMT_PROXY_MATMAS_OUT.
CREATE OBJECT prxy.
Loop at itab
MOVE_Corresponding ......to XXXXXXXXXXXXXX // we tried several option with no success here in this Loop //
EndLoop
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = it.
commit work
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
As you can see from above template I want move all the records of Internal table to Message Type structure before calling Proxy, CALL METHOD proxy->.........
Can someone provide me sample code how to achive this. We are on WEB AS 620.
Thanks a lot.
ST
suppose your table is it_datatable of type ZMDT_PROXY_MATMAS_OUT_MATN_TAB which contains matnr, description. Then try the following
data : l_var type ZMMT_PROXY_MATMAS_OUT.
l_var-MT_Proxy_Matmas_out-Matnr 1[ ] = it_datatable[ ].
then
CALL METHOD prxy->execute_asynchronous
EXPORTING
output = l_var.
commit work
Similar Messages
-
ABAP Outbound Proxy: some messages stuck in CRM system
Hi all,
we've a strange issue with a ABAP Outbound proxy we've generated in our CRM 5.0 system (asynchronous interface).
Sometimes messages stuck in the CRM system. They are in status 'Scheduled' (green flag) in SXMB_MONI in the CRM system. When I have a look at the corresponding queue, there's no message within. Status in SMQ1 and SMQ2 is fine, too. All queues are registered. When I reprocess such a message manually in SXMB_MONI in CRM with the restart button, they're sent fine to XI.
Please note: it's NOT a general issue with that outbound proxy. In most cases the messages are sent immediately, just in some cases the messages stuck and I don't know why.
Is it possible to restart such messages automatically? I just know the report RSXMB_RESTART_MESSAGES, but that one just restarts messages in Error status. But the ones we have aren't in error status so they cannot be selected with that report.
Any idea where could be the problem / we should check?
BR
HolgerOn which SP r u working correctly. May be an SP upgrade could help.
Regards,
Prateek -
ABAP client proxy With Receiver JDBC Adapter
Hello Experts,
I am working on a scenerio ABAP client proxy With Receiver JDBC Adapter.
The client proxy program will fetch the master data related to equipment in plant maintenance module and will update the sql database through Receiver JDBC Adapter .
my requirement is if the equipement is created in sap then the scheduled job has to trigger the client proxy program and send the message with status 'created' to sql data base.
if the equipment is modified in sap then the scheduled job has to trigger the client proxy program and send the message with status 'modify' to sql data base.
please let me know how can i write the logic/code for this scenerio in client proxy program.
Tables for equipment master i am using is EQUI and fields are ERDAT and AEDAT which is created date and modified date.
fields for scheduling start date is tbtcp-sdldate.
Thanks in advance.
Ram.Hello Ram,
Here you can check if updated date field is not empty then send status as created and if this field is not blank then send status as modified record.
Monica -
Sync abap outbound proxy steps
Hi friends,
Could you please help me to send the sync abap outbound proxy creation blogs.
advanced thanks
Raohi
check this
Outbound Synchronous Proxy
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/abap%2bproxy%2boutbound%2bprogram%2b-%2bpurchase%2border%2bsend
rgds
Arun -
Authority check in infoset query for field with multiple entries
how can i perform the authority check in sq02 "at selection screen" for a multiple entry field
e.g. EKORG low 0001 - high 0005
or EKORG 0001, 0004, 0005
I already added the following statements
How the field for EKORG check must be filled
if EKORG is initial.
message 'Bitte Einkaufsorganisation wählen' TYPE 'E'.
endif.
AUTHORITY-CHECK OBJECT 'M_BEST_EKO'
ID 'ACTVT' FIELD '03'
ID 'EKORG' FIELD ?????.
IF sy-subrc = 4.
MESSAGE 'Keine Berechtigung für EKORG sy-subrc 4' TYPE 'E'.
ENDIF.hi,
which event do you use for your coding ?
it must be AT SELECTION-SCREEN
A. -
AutoComplete with multiple entries
I would like to develop an autocomplete or autosuggest
component that is able to take multiple entries in the text input
that are separted by commas or semicolons (similar to an email
application's 'To: functionality). I've looked at both the Adobe
AutoComplete component and the Yahoo Astra Flex AutoComplete
component, and they don't seem to be able to handle this natively.
I would appreciate any help on how to extend these components to
accept multiple entries, or if there is another component that
already has this built in functionality, please let me know.
Thanks,
StuartI'm currently looking for that too :)
Seems like no one ever made one -
ABAP proxy with Multiple PI system and Single SAP ECC
Hello Folks,
In my current project i have 2 SAP Pi system, PI7.0 and PI7.11. Currently 80% of the interfaces are on PI7.0 and we are planning to move interfaces to new PI7.11 next year. Old environment has lot of ABAP proxies ECC is configured to send data to it.
All the new developments will be done in new SAP and i need to use SAP PI7.11 for that. I have an interface where i need to use ABAP proxy.
How can i configure ECC so that it sends new ABAP proxy interface data to new PI7.11 and old proxies to old PI7.0.
As far as i know we can make ECC point to one integration server at one time. Any thoughts or suggestion ?
Regards
InderHi,
Multiple connection to ESR in sproxy can be done by switching host value in RFC destination SAP_ESR_PROXY and for maintaining multiple PI runtime you should use subparameter for parameter SXMB_ADM->Runtime->IS_URL (you can define combination of Sender/Receiver for subparameter in transaction SXMSIF).
This way for every sender/receiver combination you can use different integration server.
Regards,
Gourav -
Create Web Service (outbound proxy) with WAS 620
Hi all,
Is it possible to create an outbound Abap proxy - using a WSDL - to consume a web service, in a 4.7 Release (Web AS 620)? Is there any restrictions on this release?
Thanks,
MiguelHi,
Did you check this web log?
/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
Eddy -
Hi Everyone,
In PI ESR, I have update the data enhancement structure with new field and I have mistakenly activated standard service Interface which is refering to ehancement structure.
Now in the ABAP side in SPROXY transaction, Interface is showing red. Since its standard proxy I am unable to regenerate the proxy.
Please let me know your suggession.
Regards,
SudheerHi,
Error is related to the connection set up done between ECC and PI.
Test the connection using sldcheck.
HTH
Rajesh -
Help with Multiple Entries in To Field
Hi,
I need some assistance... I have an iPhone 4 and have it configured to get mail via POP and send via SMTP (no Exchange involved). I have all my contacts synchronised from my Outlook client from home. What I am seeing is that when I create a new e-mail on my phone and starting typing in the name of the contact, the contact is listed (and both work and home e-mail addresses are there). But in addition to this, similar to that of the "NK2 file in Outlook" there is an entry also for the contact as a plain e-mail address which is not stored on my phone contacts.
To summarise, I am getting say a contact with both a work and home e-mail listed plus what the phone sees as their e-mail address (not actually stored as a contact). For example,
TO: Barb
> Barbara H
e-mail_address
> Barbara H
home e-mail_address
> Barbara H
work e-mail_address
Does that make sense? I want to get rid of the first listed e-mail address as I rely on my saved contacts in my phone for sending e-mails. It seems to be working in a fashion like the Outlook nk2 files for autofilling e-mail addresses.
Any advice is greatly appreciated.
Cheers,
LozI spoke to apple and they advised this was a feature of the server and people who do this should really use the CC field
<cough>BS</cough>
I can't believe anyone at Apple said that was expected. That's worth complaining to Apple Support about because clearly whoever you spoke to isn't qualified to take calls.
Specifying multiple 'to' recipients should be entirely valid. I'd look at the mail logs to see what's going on. -
Sun One 6.1 reverse proxy with multiple certs
We are using Sun One Web Server 6.1sp6 as a reverse proxy without the passthrough plugin. We also have multiple certs and not a global cert and what we are seeing is the data getting "staged" on the web server before moving on to the destination (which obviously halves throughput). Some research tells us that this staging is happening because it needs to re-encrypt the packets for the next cert.
Is there any way besides having a global cert that we can get around this? Would using the passthrough plugin help?
Thanks,
DonThe thing is that it apparently doesn't do it on the fly, which is why I was wondering if the passthrough plug in would help. In other words, if I am sending a 10mb file through to the destination server (there's a weblogic server on the back end with a different cert that I want to do the real processing), the web server waits until it gets all 10mb then resends it. Seems it should do the encrypt/decrypt on a packet level to me.
As far as the config, I didn't set it up, I'm just trying to get it to work :)
Here are the configs, if it would help. If there's something set up wrong here, please feel free to point it out!
Thanks,
Don
magnus.conf
# The NetsiteRoot, ServerName, and ServerID directives are DEPRECATED.
# They will not be supported in future releases of the Web Server.
NetsiteRoot /iplanet/servers
ServerName rpserver.testdomain.com
ServerID https-rpserver.testdomain.com
RqThrottle 256
DNS off
Security on
PidLog /iplanet/servers/https-rpserver.testdomain.com/logs/pid
User iplanet1
StackSize 131072
TempDir /tmp/https-rpserver.testdomain.com-a9dd9515
PostThreadsEarly off
KernelThreads off
ChunkedRequestBufferSize 0
LogVerbose on
LogVsId off
AsyncDNS off
KeepAliveTimeout 10
UseNativePoll on
Init fn="load-modules" funcs="wl_proxy,wl_init" shlib=/iplanet/servers/plugins/nsapi/wls923/libproxy128_61.so
Init fn="wl_init"
Init fn="load-modules" shlib="/iplanet/servers/bin/https/lib/libj2eeplugin.so" shlib_flags="(global|now)"
Init fn="stats-init" profiling="on"
obj.conf
# The NetsiteRoot, ServerName, and ServerID directives are DEPRECATED.
# They will not be supported in future releases of the Web Server.
NetsiteRoot /iplanet/servers
ServerName rpserver.testdomain.com
ServerID https-rpserver.testdomain.com
RqThrottle 256
DNS off
Security on
PidLog /iplanet/servers/https-rpserver.testdomain.com/logs/pid
User iplanet1
StackSize 131072
TempDir /tmp/https-rpserver.testdomain.com-a9dd9515
PostThreadsEarly off
KernelThreads off
ChunkedRequestBufferSize 0
LogVerbose on
LogVsId off
AsyncDNS off
KeepAliveTimeout 10
UseNativePoll on
Init fn="load-modules" funcs="wl_proxy,wl_init" shlib=/iplanet/servers/plugins/nsapi/wls923/libproxy128_61.so
Init fn="wl_init"
Init fn="load-modules" shlib="/iplanet/servers/bin/https/lib/libj2eeplugin.so" shlib_flags="(global|now)"
Init fn="stats-init" profiling="on"
server.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->
<!DOCTYPE SERVER PUBLIC "-//Sun Microsystems Inc.//DTD Sun ONE Web Server 6.1//EN" "file:///iplanet/servers/bin/https/dtds/sun-web-server_6_1.dtd">
<SERVER qosactive="false">
<PROPERTY name="docroot" value="/iplanet/servers/docs"/>
<PROPERTY name="accesslog" value="/iplanet/servers/https-rpserver.testdomain.com/logs/access"/>
<PROPERTY name="user" value=""/>
<PROPERTY name="group" value=""/>
<PROPERTY name="chroot" value=""/>
<PROPERTY name="dir" value=""/>
<PROPERTY name="nice" value=""/>
<LS id="ls1" port="443" servername="rpserver.testdomain.com" defaultvs="https-rpserver.testdomain.com" security="on" ip="any" blocking="false" acceptorthreads="2">
<SSLPARAMS servercertnickname="Server-Cert" ssl2="off" ssl2ciphers="-rc4,-rc4export,-rc2,-rc2export,-desede3,-des" ssl3="on" tls="on" ssl3tlsciphers="-rsa_rc4_128_sha,+rsa_rc4_128_md5,-rsa_rc4_56_sha,-rsa_rc4_40_md5,+rsa_3des_sha,+rsa_des_sha,-rsa_des_56_sha,-rsa_rc2_40_md5,-rsa_null_md5,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,+fips_3des_sha,-fips_des_sha" tlsrollback="on" clientauth="off"/>
</LS>
<MIME id="mime1" file="mime.types"/>
<ACLFILE id="acl1" file="/iplanet/servers/httpacl/generated.https-rpserver.testdomain.com.acl"/>
<VSCLASS id="vsclass1" objectfile="obj.conf" rootobject="default" acceptlanguage="false">
<VS id="https-rpserver.testdomain.com" connections="ls1" mime="mime1" aclids="acl1" urlhosts="rpserver.testdomain.com" state="on">
<PROPERTY name="docroot" value="/iplanet/servers/docs"/>
<USERDB id="default"/>
<SEARCH>
<WEBAPP uri="/search" path="/iplanet/servers/bin/https/webapps/search" enabled="true"/>
</SEARCH>
</VS>
</VSCLASS>
<JAVA javahome="/iplanet/servers/bin/https/jdk" serverclasspath="/iplanet/servers/bin/https/jar/webserv-rt.jar:${java.home}/lib/tools.jar:/iplanet/servers/bin/https/jar/webserv-ext.jar:/iplanet/servers/bin/https/jar/webserv-jstl.jar:/iplanet/servers/bin/https/jar/ktsearch.jar" classpathsuffix="" envclasspathignored="true" nativelibrarypathprefix="" debug="false" debugoptions="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n" dynamicreloadinterval="-1">
<JVMOPTIONS>-Djava.security.auth.login.config=/iplanet/servers/https-rpserver.testdomain.com/config/login.conf</JVMOPTIONS>
<JVMOPTIONS>-Djava.util.logging.manager=com.iplanet.ias.server.logging.ServerLogManager</JVMOPTIONS>
<JVMOPTIONS>-Xmx256m</JVMOPTIONS>
<SECURITY defaultrealm="native" anonymousrole="ANYONE" audit="false">
<AUTHREALM name="file" classname="com.iplanet.ias.security.auth.realm.file.FileRealm">
<PROPERTY name="file" value="/iplanet/servers/https-rpserver.testdomain.com/config/keyfile"/>
<PROPERTY name="jaas-context" value="fileRealm"/>
</AUTHREALM>
<AUTHREALM name="native" classname="com.iplanet.ias.security.auth.realm.webcore.NativeRealm">
<PROPERTY name="jaas-context" value="nativeRealm"/>
</AUTHREALM>
<AUTHREALM name="ldap" classname="com.iplanet.ias.security.auth.realm.ldap.LDAPRealm">
<PROPERTY name="directory" value="ldap://localhost:389"/>
<PROPERTY name="base-dn" value="o=isp"/>
<PROPERTY name="jaas-context" value="ldapRealm"/>
</AUTHREALM>
</SECURITY>
<RESOURCES/>
</JAVA>
<LOG file="/iplanet/servers/https-rpserver.testdomain.com/logs/errors" loglevel="info" logtoconsole="true" usesyslog="false" createconsole="false" logstderr="true" logstdout="true" logvsid="false"/>
</SERVER> -
MDM ABAP API: Query with Multiple Parameters
I would like to query MDM repository passing multiple parameters. I used the following code, however, it didn't work.
If I pass only one parameter, it works fine.
DATA lt_query TYPE mdm_query_table.
DATA ls_query TYPE mdm_query.
DATA lv_search_text TYPE string.
DATA lt_result_set TYPE mdm_search_result_table.
DATA ls_result_set LIKE LINE OF lt_result_set.
* Fill query structure with FIRST parameter
ls_query-parameter_code = 'Name'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = 'BMW'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
* Fill query structure with SECOND parameter
ls_query-parameter_code = 'Model'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = '2009'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
* Query on records (search for value 'BMW' model '2009' in table Products)
CALL METHOD lr_api->mo_core_service->query
EXPORTING
iv_object_type_code = 'Products'
it_query = lt_query
IMPORTING
et_result_set = lt_result_set.Hi,
I see you are not clearing your local structure "ls_query". This could be reason of problem, try this and let us know the result:
DATA lt_query TYPE mdm_query_table.
DATA ls_query TYPE mdm_query.
DATA lv_search_text TYPE string.
DATA lt_result_set TYPE mdm_search_result_table.
DATA ls_result_set LIKE LINE OF lt_result_set.
Fill query structure with FIRST parameter
ls_query-parameter_code = 'Name'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = 'BMW'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Fill query structure with SECOND parameter
ls_query-parameter_code = 'Model'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = '2009'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Query on records (search for value 'BMW' model '2009' in table Products)
CALL METHOD lr_api->mo_core_service->query
EXPORTING
iv_object_type_code = 'Products'
it_query = lt_query
IMPORTING
et_result_set = lt_result_set. -
An LSMW for Classification with multiple entries possible in the characte
Hello, we've got a LSMW which works fine on a recording using transaction CLMM. This updates characteristics data ok as long as the fields are single value entires (eg "Y" or "N" or "")
But now I want to add a new characteristic which can store multiple values eg Machine Type = "C10" or Machine Type = "C10, C18" or Machine Type = "C10, T01, T02, C30"
When I try to adapt CLMM it gives me an error that the format of the field is not correct. I tried comma separated eg "C10, T01, T02, C30" but it was not accepted.
Is there a special format for changing the multiple value characteristics in CLMM which I can use in LSMW?
Is there a more cunning way?
Do I have to get a development made for this??
Has anyone solved this problem?
Many thanksHello,
Why don't you use a Business Object Method (BAPI) in your LSMW.
There are a lot of BOR objects related to classification data.
Example : Business Object : BUS1088 - Characteristics with method CREATE.
A batch input often gives problems, especially with multi value fields.
When you use a BOR method in LSMW you can map your input files to the structures of the BOR method.
Wim -
Hallo,
during ABAP Mapping I have the following problem:
I want to return a message to XI Java stack in the following format:
<?xml version="1.0"?><ns0:MT_FILE_PAXAR_INB xmlns:ns0="http://logimoda.com/ns_paxar">
<Recordset>
[... child tags which values are retrieved from fields of each record of an internal table]
</Recordset>
</ns0:MT_FILE_PAXAR_INB>
I want n <Recordset>, one for each record of the internal table "t_etichette", which is populated by:
CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
Now, i'm not able to append n sibling <Recordset>, only one is appended to parent <ns0:MT_FILE_PAXAR_INB>.
I guess the solution is ixml_document_fragment or using someway an iteration, but I don't know how...
Any suggestion?
Thanks all in advance:)
PS below my current source code:
METHOD if_mapping~execute .
1.0 Def. Data Types - Start **********************************
DATA:
wa_t_richieste TYPE zppst_input_etichette_pezzo,
t_richieste TYPE TABLE OF zppst_input_etichette_pezzo,
wa_t_etichette TYPE zppst_output_etichette_pezzo,
t_etichette TYPE TABLE OF zppst_output_etichette_pezzo,
wa_t_logelab TYPE zppst_esito_etichette_pezzo,
t_logelab TYPE TABLE OF zppst_esito_etichette_pezzo.
1.1 Def. Data Types - End **********************************
initialize iXML
TYPE-POOLS: ixml.
CLASS cl_ixml DEFINITION LOAD.
create main factory
DATA: ixmlfactory TYPE REF TO if_ixml.
ixmlfactory = cl_ixml=>create( ).
create stream factory
DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
streamfactory = ixmlfactory->create_stream_factory( ).
create input stream
DATA: istream TYPE REF TO if_ixml_istream.
istream = streamfactory->create_istream_xstring( source ).
DATA: val_nodo TYPE string,
nome_nodo TYPE string,
nome_el TYPE string
DATA: ta_data TYPE STANDARD TABLE OF ztabxml,
wa_data TYPE ztabxml.
parse input document =================================================
initialize input document
DATA: idocument TYPE REF TO if_ixml_document.
idocument = ixmlfactory->create_document( ).
parse input document
DATA: iparser TYPE REF TO if_ixml_parser.
iparser = ixmlfactory->create_parser( stream_factory = streamfactory
istream = istream
document = idocument ).
iparser->parse( ).
DATA: element TYPE REF TO if_ixml_element.
DATA: articolo TYPE REF TO if_ixml_element.
DATA: collo TYPE REF TO if_ixml_element.
DATA: l_trace TYPE string.
DATA: child TYPE REF TO if_ixml_node.
DATA: nr_art TYPE REF TO if_ixml_node_collection.
DATA: dest TYPE rfcdest,
wa_cust TYPE zxi_cust,
mandt TYPE sy-mandt.
SELECT SINGLE * FROM zxi_cust INTO wa_cust
WHERE parname1 = 'RFC_DEST'
AND parname2 = 'R/3'.
dest = wa_cust-parvalue1.
mandt = dest+7(3).
1.2 Mapping XML -> items ************************************
CLEAR nome_nodo.
CLEAR child.
CLEAR ciclo.
element = idocument->find_from_path_ns(
path =
'/RIGA'
default_uri = '' ).
nome_el = element->get_name( ).
ciclo = 'true'.
WHILE ciclo = 'true'.
Mandante
MOVE mandt TO wa_t_richieste-mandt.
IF nome_el = 'RIGA'.
child = element->get_first_child( ).
WHILE child IS BOUND.
nome_nodo = child->get_name( ).
val_nodo = child->get_value( ).
CASE nome_nodo.
WHEN 'COD_MSGEXPORT'.
Identificativo da Logimoda
MOVE val_nodo TO wa_t_richieste-zcodeidoc.
WHEN 'C0001'.
Commessa
MOVE val_nodo TO wa_t_richieste-j_3acomord.
ENDCASE.
child = child->get_next( ).
ENDWHILE.
APPEND wa_t_richieste TO t_richieste.
CLEAR: wa_t_richieste.
element ?= element->get_next( ).
IF NOT element IS BOUND.
EXIT.
ENDIF.
nome_el = element->get_name( ).
ELSE.
ciclo = 'false'.
ENDIF.
ENDWHILE.
1.3 call RFC ************************************************
DATA: return TYPE sy-subrc.
DATA: t_return TYPE TABLE OF bapiret2.
DATA: st_return TYPE bapiret2.
DATA: mess_exc TYPE string.
DATA: t_error_text TYPE string.
CLEAR: return.
CLEAR: t_return.
REFRESH: t_return.
CALL FUNCTION 'ZXI_ETICHETTE_COMPOSIZIONE_PEZ'
DESTINATION
dest
EXPORTING
TO DO: Y or N ??
fl_alv = ' '
TABLES
t_richieste = t_richieste
t_etichette = t_etichette
t_logelab = t_logelab
EXCEPTIONS
no_richieste = 1
no_etichette = 2
no_plant = 3
OTHERS = 4.
IF ( ( sy-subrc <> 0 ) AND
( dest <> 'MZ1CLNT400' )
DATA subrc TYPE sy-subrc.
CASE subrc.
WHEN 1.
LOOP AT t_logelab INTO st_logelab WHERE type EQ 'E'.
CONCATENATE 'ABAP MAPPING ERROR: '
'NO_RICHIESTE'
INTO mess_exc.
trace->trace( level = '1'
message = mess_exc ).
RAISE EXCEPTION TYPE cx_mapping_fault
EXPORTING error_code = '90'
error_text = 'NO_RICHIESTE'.
ENDLOOP.
WHEN 2.
WHEN 3.
WHEN OTHERS.
ENDCASE.
ENDIF.
1.4 build up output document *****************************************
DATA: ret_value TYPE i.
DATA: uri TYPE string.
uri = 'http://logimoda.com/ns_paxar'.
create output document
DATA: odocument TYPE REF TO if_ixml_document.
odocument = ixmlfactory->create_document( ).
Test - Start ***********
DATA: root_ns TYPE REF TO if_ixml_namespace_decl.
root_ns = odocument->create_namespace_decl(
name = 'ns0'
prefix = 'ns0'
uri = uri ).
ret_value = odocument->set_namespace_prefix(
prefix = 'ns0'
ret_value = odocument->set_namespace_uri(
uri = 'ns0'
root = odocument->create_element_ns(
name = 'ns0'
prefix = 'ns0'
uri = 'http://logimoda.com/ns_paxar'
Test - End ***********
create root XML tag
DATA: root TYPE REF TO if_ixml_element.
root = odocument->create_simple_element_ns(
name = 'MT_FILE_PAXAR_INB'
prefix = 'ns0'
uri = uri
value = temp
parent = odocument ).
DATA: ns_xml_attr TYPE REF TO if_ixml_attribute.
ns_xml_attr = odocument->create_attribute_ns(
name = 'ns0'
prefix = 'xmlns'
uri = 'http://logimoda.com/ns_paxar'
ret_value = ns_xml_attr->set_value( uri ).
ret_value = root->set_attribute_node_ns(
new_attr = ns_xml_attr
create recordset tag (<= see ref. in FTP Comm. Channel)
DATA: recordset TYPE REF TO if_ixml_element.
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = root ).
Test - Start ***********
DATA: doc_fragm TYPE REF TO if_ixml_document_fragment.
doc_fragm = odocument->create_document_fragment( ).
create recordset tag (<= see ref. in FTP Comm. Channel)
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = doc_fragm ).
DATA: ref_child TYPE REF TO if_ixml_node.
ret_value = root->insert_child(
new_child = doc_fragm
ref_child = ref_child
DATA: recordset_array TYPE REF TO if_ixml_node_collection.
recordset_array->append_item(recordset_el).
Test - End ***********
XI Inbound Message: MT_FILE_PAXAR_INB
DATA: zcodeidoc TYPE REF TO if_ixml_element.
DATA: j_3acomord TYPE REF TO if_ixml_element.
DATA: werks TYPE REF TO if_ixml_element.
DATA: trilog_yseason TYPE REF TO if_ixml_element.
DATA: temp TYPE string.
LOOP AT t_etichette INTO wa_t_etichette.
HERE IS THE PROBLEM, HOW TO DO IT ?
ret_value = root->insert_child(
new_child = recordset
ref_child = recordset
CLEAR temp.
MOVE wa_t_etichette-zcodeidoc TO temp.
zcodeidoc = odocument->create_simple_element(
name = 'ZCODEIDOC'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-j_3acomord TO temp.
j_3acomord = odocument->create_simple_element(
name = 'j_3acomord'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-werks TO temp.
werks = odocument->create_simple_element(
name = 'WERKS'
value = temp
parent = recordset ).
CLEAR temp.
MOVE wa_t_etichette-trilog_yseason TO temp.
trilog_yseason = odocument->create_simple_element(
name = 'trilog_yseason'
value = temp
parent = recordset ).
CLEAR wa_t_etichette.
ENDLOOP.
render document ======================================================
create output stream
DATA: ostream TYPE REF TO if_ixml_ostream.
ostream = streamfactory->create_ostream_xstring( result ).
create renderer
DATA: renderer TYPE REF TO if_ixml_renderer.
DATA irc TYPE i.
renderer = ixmlfactory->create_renderer( ostream = ostream
document = odocument ).
irc = renderer->render( ).
1.4 for debug ********************************************************
Uploading Files and Manipulating their Content
(SAP Library - Business Server Pages)
http://help.sap.com/saphelp_nw2004s/helpdata/en/ba/78d3c747b24546ab1c1499a054d8a5/content.htm
DATA: conv_out TYPE REF TO cl_abap_conv_out_ce.
conv_out = cl_abap_conv_out_ce=>create(
encoding = 'UTF-8'
endian = 'L' ).
conversion string => xstring *********************************
conv->convert( EXPORTING data = out
IMPORTING buffer = result ).
conversion xstring => string *********************************
DATA: outxml TYPE string.
DATA: conv_in TYPE REF TO cl_abap_conv_in_ce.
conv_in = cl_abap_conv_in_ce=>create( input = result ).
conv_in->read( IMPORTING data = outxml ).
store file txt on PC for test purpose - Start ********
DATA: dataset_str_xml TYPE string,
debug_allowed(1) TYPE c,
l_xml_size TYPE i.
dataset_str_xml = '/usr/sap/XIT/ZXI_PARAX_TEST_XML.xml'.
OPEN DATASET dataset_str_xml FOR OUTPUT
IN TEXT MODE ENCODING DEFAULT.
TRANSFER outxml TO dataset_str_xml.
CLOSE DATASET dataset_str_xml.
store file txt on PC for test purpose - End ********
ENDMETHOD.create recordset tag (<= see ref. in FTP Comm. Channel)
recordset = odocument->create_simple_element(
name = 'Recordset'
value = temp
parent = doc_fragm ).
this object must be created inside your loop... -
Abap cleint proxy with Multi mapping
Hi folks,
In this senario i am using client proxy to jdbc.
but my client proxy is generating input file
- <n0:MT_xxx_SAP xmlns:n0="http://xxxxx/bbb/HR/002/SAP_to_yyyy" xmlns:prx="urn:sap.com:proxy:RD1::700:2008/01/11">
- <row>
<BUKRS>This is a string 11</BUKRS>
<WERKS>This is a string 12</WERKS>
<BTRTL>This is a string 13</BTRTL>
<NAME1>This is a string 14</NAME1>
<BTEXT>This is a string 15</BTEXT>
</row>
- <row>
<BUKRS>This is a string 16</BUKRS>
<WERKS>This is a string 17</WERKS>
<BTRTL>This is a string 18</BTRTL>
<NAME1>This is a string 19</NAME1>
<BTEXT>This is a string 20</BTEXT>
</row>
</n0:MT_xxx_SAP>
but in message mapping the input xml is excepting as
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:MT_xxx_SAP xmlns:ns1="http://xxxx/yyy/HR/002/SAP_to_jjjjj">
<row>
<BUKRS>4654</BUKRS>
<WERKS>321</WERKS>
<BTRTL>5545</BTRTL>
<NAME1>khghjg</NAME1>
<BTEXT>jhdhgdg</BTEXT>
</row>
</ns1:MT_xxx_SAP>
</ns0:Message1>
</ns0:Messages>
how to handle this <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
which is autometically generating in message mapping..
Regards
VijayHi,
your msg mapping is not generating target node.........so in your msg mapping, map the target header node to source header node.......msg1 to msg1......then map the target msg type to source row node.............then take SXMB_MONI payload and test your msg mapping to see if target node is getting generated............
Regards,
Rajeev Gupta
Edited by: RAJEEV GUPTA on Feb 9, 2009 2:44 PM
Maybe you are looking for
-
Creation of Shopping Cart Infocube on the top of DSO(0BBP_SC)
Hi Experts, I am new to SAP BW/BI. So please help me in solving this issue. I am planning to create an Infocube on top of Standard Shopping Cart DSO (0BBP_SC - Shopping Cart - Individual Documents). There is no standard Infocube for shopping Cart so
-
HT1688 HELP! My Iphone4 is filling up with unknown memory
My iphone is filling up with unknown memory. If a delete an app or photos the unknown memory will take up that free space as well. This is my second iphone to do this. My computer has no viruses and I have reset my phone. The only thing i can think o
-
Change Asset Qty in Acquistion document
Hi, Due to the inconsistency in the asset master and its corresponding documents, we need to update the qty in accounting document. I've made the qty field editable in ob32- document change rules but still its appearing greyed out. Please suggest ho
-
How to install APEX in R12 Environment
HI, We have a new requirement that, i have to install APEX In our R12.0.5 environment OS : Oracle Linux, I have no idea how to install in Applications environment, Pleas guide me how to install in R12 environment.
-
GRC-IDM Integration: missing web-service?
Hi Experts, I have been loading the GRC provisioning framework for SAP Netweaver IDM, as well as the VDS configuration file (in the templates available, I used SAP Netweaver > GRC Access Control 5.3 SP2). The integration is working fine and IDM is co