Anonymizer Module Processor - how to use ?
Hi,
I have a requirement where the incoming XML contains namespace prefixes that do not match the namespace prefix set on the XI definition.
Therefore the message mapping does not work !
I have seen a few thread recommending using the Anonymizer Module Processor to override the namespace prefixes.
However, I cannot seem to get this to work on an message inbound to XI - it always seems to retain the namespace prefixes of the incoming message.
I have added the followingto the module section of the SOAP adapter inbound channel:
Module name - localejbs/AF_Modules/XMLAnonymizerBean
Module type - Local Enterprise Bean
Module key - namespace
Module configuration:
Module key - namespace
Parameter name - anonymizer.acceptNamespaces
Parameter value - 'http://schemas.xmlsoap.org/soap/envelope/' ns0 'http://tempuri.org' ns0 'java:com.xerox.hc.registration.event' ns0
The incoming XML looks like this:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <m:getRegistrationEventQueryResponse xmlns:m="http://tempuri.org/">
- <result xmlns:n1="java:com.xerox.hc.reg2.registration.event" soapenc:arrayType="n1:RegistrationEventJB[9]">
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">KN0025428</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">KN0025428</string>
</clientId>
<clientType xsi:type="xsd:string">Device</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T12:33:58.318-05:00</eventDate>
<eventType xsi:type="xsd:string">SerialNumberChange</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">TFN702031</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">TFN702031</string>
</clientId>
<clientType xsi:type="xsd:string">Device</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T13:00:27.449-05:00</eventDate>
<eventType xsi:type="xsd:string">SerialNumberChange</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">PSG000002</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">PSG000002</string>
</clientId>
<clientType xsi:type="xsd:string">Device</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T17:55:13.067-05:00</eventDate>
<eventType xsi:type="xsd:string">Deregistration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">RKR000002</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">RKR000002</string>
</clientId>
<clientType xsi:type="xsd:string">Device</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T18:53:42.629-05:00</eventDate>
<eventType xsi:type="xsd:string">Deregistration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">RKR000002</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">RKR000002</string>
</clientId>
<clientType xsi:type="xsd:string">Device</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T18:54:40.235-05:00</eventDate>
<eventType xsi:type="xsd:string">Registration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">KMM010309</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">KMM-010309</string>
</clientId>
<clientType xsi:type="xsd:string">ProxyDevice</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-23T19:00:56.574-05:00</eventDate>
<eventType xsi:type="xsd:string">Registration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">DLC010061</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">DLC0100615CA</string>
</clientId>
<clientType xsi:type="xsd:string">ProxyDevice</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-24T15:29:59.268-05:00</eventDate>
<eventType xsi:type="xsd:string">Deregistration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">DLC010061</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">DLC0100615CA</string>
</clientId>
<clientType xsi:type="xsd:string">ProxyDevice</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-24T15:40:37.123-05:00</eventDate>
<eventType xsi:type="xsd:string">Registration</eventType>
</RegistrationEventJB>
- <RegistrationEventJB xsi:type="n1:RegistrationEventJB">
- <cleanSerialNumber soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">TFN702031</string>
</cleanSerialNumber>
- <clientId soapenc:arrayType="xsd:string[1]">
<string xsi:type="xsd:string">TFN702031</string>
</clientId>
<clientType xsi:type="xsd:string">ProxyDevice</clientType>
<eventDate xsi:type="xsd:dateTime">2007-01-25T10:30:02.660-05:00</eventDate>
<eventType xsi:type="xsd:string">Deregistration</eventType>
</RegistrationEventJB>
</result>
</m:getRegistrationEventQueryResponse>
</env:Body>
</env:Envelope>
All namespace prefixes need to be overridden to ns0 but with the configuration I have added this is not working.
Any ideas what I am missing or have configured incorrectly ?
Kind regards
Colin.
Hi Colin,
There is no matter how the namespace prefixes are called. If you have ns0 or t is no difference.
The problem why the mapping is not working is the difference between prefixed namespaces like this:
<m:getRegistrationEventQueryResponse xmlns:m="http://tempuri.org/">
and non-prefixed namespaces like this:
<result xmlns:n1="java:com.xerox.hc.reg2.registration.event">
With the IR you can only create message types with one prefixed namesspace. It is not possible to create a message structure as you need inside the IR.
You have to create the WSDL externally and upload as external definition to the IR. Let BizTalk create the WSDL.
If this is not possible, you should XSLT for mapping.
Regards
Stefan
Similar Messages
-
FUNCTION MODULE RSDRC_INFOPROV_READ, HOW TO USE IT
HI ALL,
i have to use this function module RSDRC_INFOPROV_READ to access data from a remote cube, can anybody tell me how to use this function module properly. i am using a remote cube ARC_DP which is developed by our BIW guys, i am passing all the data correctly . where the problem is coming.
Please tell me if anybody has used this function module.
Thanks & Regards,,
poornaHi poorna,
I think you're talking about RSDRI_INFOPROV_READ and not RSDRC_INFOPROV_READ. RSDRI_INFOPROV_READ is pretty much used by everyone who needs to read data from InfoProviders.
For an example on how the function module should be used, please look at SAP's example. Check out program RSDRI_INFOPROV_READ_DEMO in SE38. Using it is pretty straightforward. If the code in the demo is not clear, please post again and i will help.
Hope this helps. -
Hi Experts. I hav a doubt in Function Module SPELL_AMOUNT how to use it ?
Parameters: p_num type c.
Data: Res_in_Words Type c.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = p_num
CURRENCY = ' '
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = Res_in_Words.
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Write: /3 Res_in_Words.
When I execute it, program goes to Dump due to an exception in the program, that is, in the parameter IN_WORDS of the FM, the parameter passed is of type not matching with the type to be sent to that parameter. So run time error occured.
Can any one pls. resolve it soon.
Thanks in advance.
Moderator Message: This type of questions have been asked many times in the forum. Search for them. Also, do NOT ask the forum members to "resolve your issue soon". We all have full-time jobs and are not getting paid to resolve your issues, especially the ones that have been asked and answered many times in the forum.
Edited by: kishan P on May 26, 2011 1:09 PMHi,
If you pass the following values into the FM,
AMOUNT 10000
CURRENCY INR
LANGUAGE EN
you will get the output as
IN_WORDS 000000000000100000 2 ONE HUNDRED
Here the last two digit of the amount is considered as decimal place in INR currency.
Check whether you are passing the right amount with considering decimal places according to the passed currency. -
CALCULATE_TAX_ITEM how to use it
hello al
cud u tell me what values shud be passed into CALCULATE_TAX_ITEM function module.
and how to use it.Hi,
REPORT zreport10 .
TABLES : ekko , ekpo , t001 , komk , komp .
DATA mwsbp TYPE komp-mwsbp .
PARAMETERS : p_ebeln TYPE ekpo-ebeln ,
p_ebelp TYPE ekpo-ebelp .
START-OF-SELECTION .
PERFORM calculate_tax USING p_ebeln p_ebelp CHANGING mwsbp .
WRITE mwsbp .
FORM calculate_tax *
FORM calculate_tax USING p_ebeln TYPE ekpo-ebeln
p_ebelp TYPE ekpo-ebelp
CHANGING p_mwsbp TYPE komp-mwsbp .
CONSTANTS: bstyp-info VALUE 'I',
bstyp-ordr VALUE 'W',
bstyp-banf VALUE 'B',
bstyp-best VALUE 'F',
bstyp-anfr VALUE 'A',
bstyp-kont VALUE 'K',
bstyp-lfpl VALUE 'L',
bstyp-lerf VALUE 'Q'.
DATA : taxcom TYPE taxcom ,
t_konv TYPE TABLE OF komv WITH HEADER LINE .
DATA: BEGIN OF tkomv OCCURS 50.
INCLUDE STRUCTURE komv.
DATA: END OF tkomv.
DATA: BEGIN OF tkomvd OCCURS 50. "Belegkonditionen
INCLUDE STRUCTURE komvd.
DATA: END OF tkomvd.
DATA : BEGIN OF tkomvh OCCURS 50.
INCLUDE STRUCTURE komv.
DATA : vtext LIKE t685t-vtext.
DATA : END OF tkomvh.
SELECT SINGLE *
INTO ekko
FROM ekko
WHERE ebeln = p_ebeln .
SELECT SINGLE *
INTO ekpo
FROM ekpo
WHERE ebeln = p_ebeln
AND ebelp = p_ebelp .
SELECT SINGLE *
INTO t001
FROM t001
WHERE bukrs = ekko-bukrs .
taxcom-bukrs = ekpo-bukrs.
taxcom-budat = ekko-bedat.
taxcom-waers = ekko-waers.
taxcom-kposn = ekpo-ebelp.
taxcom-mwskz = ekpo-mwskz.
taxcom-txjcd = ekpo-txjcd.
taxcom-shkzg = 'H'.
taxcom-xmwst = 'X'.
IF ekko-bstyp EQ bstyp-best.
taxcom-wrbtr = ekpo-netwr.
ELSE.
taxcom-wrbtr = ekpo-zwert.
ENDIF.
taxcom-lifnr = ekko-lifnr.
taxcom-land1 = ekko-lands.
taxcom-ekorg = ekko-ekorg.
taxcom-hwaer = t001-waers.
taxcom-llief = ekko-llief.
taxcom-bldat = ekko-bedat.
taxcom-matnr = ekpo-ematn.
taxcom-werks = ekpo-werks.
taxcom-bwtar = ekpo-bwtar.
taxcom-matkl = ekpo-matkl.
taxcom-meins = ekpo-meins.
IF ekko-bstyp EQ bstyp-best.
taxcom-mglme = ekpo-menge.
ELSE.
IF ekko-bstyp EQ bstyp-kont AND ekpo-abmng GT 0.
taxcom-mglme = ekpo-abmng.
ELSE.
taxcom-mglme = ekpo-ktmng.
ENDIF.
ENDIF.
IF taxcom-mglme EQ 0.
taxcom-mglme = 1000.
ENDIF.
taxcom-mtart = ekpo-mtart.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'J_1BSA_COMPONENT_ACTIVE'
EXPORTING
bukrs = ekko-bukrs
component = 'BR'
EXCEPTIONS
component_not_active = 1
OTHERS = 2.
IF sy-subrc IS INITIAL.
komk-mandt = ekko-mandt.
komk-kalsm = ekko-kalsm.
IF ekko-kalsm = ''.
komk-kalsm = 'RM0000'.
ENDIF.
komk-kappl = 'M'.
komk-waerk = ekko-waers.
komk-knumv = ekko-knumv.
komk-lifnr = ekko-lifnr.
komp-kposn = ekpo-ebelp.
komp-matnr = ekpo-matnr.
komp-werks = ekpo-werks.
komp-matkl = ekpo-matkl.
komp-infnr = ekpo-infnr.
komp-evrtn = ekpo-konnr.
komp-evrtp = ekpo-ktpnr.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
comm_head_i = komk
comm_item_i = komp
language = 'E'
TABLES
tkomv = tkomv
tkomvd = tkomvd.
CALL FUNCTION 'J_1B_NF_PO_DISCOUNTS'
EXPORTING
i_kalsm = ekko-kalsm
i_ekpo = ekpo
IMPORTING
e_ekpo = ekpo
TABLES
i_konv = t_konv.
IF NOT ekko-llief IS INITIAL.
taxcom-lifnr = ekko-llief.
ENDIF.
ENDIF.
CALL FUNCTION 'FIND_TAX_SPREADSHEET'
EXPORTING
buchungskreis = t001-bukrs
EXCEPTIONS
not_found = 1
OTHERS = 2.
<b>CALL FUNCTION 'CALCULATE_TAX_ITEM'</b>
EXPORTING
i_taxcom = taxcom
IMPORTING
e_taxcom = taxcom
EXCEPTIONS
mwskz_not_defined = 1
mwskz_not_found = 2
mwskz_not_valid = 3
steuerbetrag_falsch = 4
country_not_found = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
p_mwsbp = taxcom-wmwst .
ENDFORM. " calculate_tax
Regards -
How to use XML Anonymizer Module for receiver mail Adapter?
Hi All,
I would like to know how to use XML Anonymizer Module for receiver mail adapter so as to change the namespace to http://sap.com/xi/XI/Mail/30 from my original namespace? Thank you all in advance?Hi,
This may help u:
Replacing one namespace with another using XML Anonymizer Module
Thanks
Amit -
Zip Payload using PayloadZipBean Module Processor
Hi,
I'm using AF_Modules/PayloadZipBean in module processor of Receiver SOAP adapter to compress/zip the message payload. I've used the following module key parameters :
Parameter Name Parameter Value
zip.Mode zipAll
zip.filenameKey contentType
In the adapter engine monitoring from RWB I can see the following warning message :
Warning Zip: message is empty or has no payload
But I can see the msg payload from the RWB message monitor as expected.
Can anyone please throw any light on this issue?
Thanks in advance,
DipankarHi Stefan,
Can you please explain what you meant by transfer-encoding gzip?
Actually the requirement is to receive xml message in compressed zipped format along with digital signature. As I understand using the ModuleProcessor which you mentioned in your blog I can send zipped message (using File Adapter I've actually achieved the result as mentioned in your blog. So thanks a lot for that!). But in file adapter I can't use digital signature. So how to satisfy both the requirements using a single adapter (and maybe using some module processors over it)?
Thanks for your help!
Dipankar -
How Module Processor initial load
To:PI Specialists
Situation:
We use sender module processor. We restart PI everyday.
So sometimes we get errror mail cause by sender module processor.
The reason of error is look up error for sender module processor.
after polling waitting, we can send successfully.
OS:AIX
DB:Oracle
PI:7.1 ehp 1(7.11)
Quetion:
We want to load module processor before first messaging in the morning.
Please show us the way of how to load module processor!!
Thank! naokiHi Naoki,
Ideally, I would have hoped that the mail adapter had taken care of this issue.
You might want to ask for a quick fix. It sounds very straightforward to wait for the polling.
Alternatively, for your particular case, as you know exactly what time the engine is starting up, you could use the channel scheduling. Suppose, your engine is scheduled to be restarted at 6AM, you can schedule your mail channel to start at 7AM.
Best regards, Yza -
Replacing one namespace with another using XML Anonymizer Module
I've following XML message
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Result xmlns:ns0="urn:source_namespace">
<ns0:Function/>
<ns0:r/>
</ns0:Result>
but I need to have a little bit different namespace (which do not exist in above message)
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Result xmlns:ns0="urn:target_namespace">
<ns0:Function/>
<ns0:r/>
</ns0:Result>
Any idea how to archieve this using XML Anonymizer Module?Hi,
You don't need a UDF to do this. Follow this...
1. Edit the Message Type Result XML Namespace as urn:target_namespace from urn:source_namespace.
2. Save this and activate it.
3. In the Message Mapping go to edit and reload this new Message Type, save the changes and activate it.
This blog How to remove namespaces in Mapping - XI By Sameer Shadab shows you hove to remove the namespace in you case you use the same to change the namespace
Thanks
SaNv... -
How to use Logical database in function module?
I will create a function module in HR.
but how to use Logical database in function module ? Logical database PNP always show screen.in function (RFC) code , it is a matter.You cannot attach the LDB to the main program of the function group.
- So you may [SUBMIT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=submit&adv=false&sortby=cm_rnd_rankvalue] a report which use the LDB and get back the data (export/import), by default in the syntax of SUBMIT the selection-screen will not be displayed
- Use [LDB_PROCESS|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=ldb_process&cat=sdn_all], fill a structured table for selection, and get data back in another table
- Use [HR function modules to read Infotypes|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=hrfunctionmodulestoread+Infotypes&adv=false&sortby=cm_rnd_rankvalue].
Regards -
How to use Change doc Function Module?
Fn mod:ZSUBTESTCHG_WRITE_DOCUMENT
Import parameters Value
OBJECTID ZSUBTESTCHG
TCODE SE37
UTIME 00:00:00
UDATE 09.03.2009
USERNAME 'TESTUSER'
PLANNED_CHANGE_NUMBER
OBJECT_CHANGE_INDICATOR I
PLANNED_OR_REAL_CHANGES R
NO_CHANGE_POINTERS
UPD_ICDTXT_ZSUBTESTCHG I
N_ZSUBTEST 2 TEST
O_ZSUBTEST 2 TEST
UPD_ZSUBTEST I
Tables Value
ICDTXT_ZSUBTESTCHG 0 Entries
I have a ztable 'ZSUBTEST' with 2 fields DEPTID and DEPNAME and ticked "change document" for data element.
I have created the above change doc write fn module. I am trying to insert a new reocrd into table.
How to use ZSUBTESTCHG_WRITE_DOCUMENT so that even if i try to change an existing record in ztable the old and new values for a particulat ztable will be filled in CDPOS Table.
Would appreciate if you can suggest me how to use in1) Update and 2) Insert scenarios.
Thanks,
Subbahi check this,
Types Declaration***
types: BEGIN OF X_audit,
Field of ZAUDIT TABLE OR a custom created table------
END OF X_audit.
Data Declaration***
Data: w_newvalues type X_audit,
w_oldvalues type X_audit.
DATA: BEGIN OF t_cdtxt OCCURS 0.
INCLUDE STRUCTURE cdtxt.
DATA: END OF t_cdtxt.
DATA: l_tcode type cdhdr-tcode ,
l_time type cdhdr-utime,
l_usnam type cdhdr-username,
l_date type cdhdr-udate.
**Constants****
CONSTANTS : l_objectid TYPE cdhdr-objectid VALUE 'ZAUDIT_CD'.
Initialization.
Clear: l_tcode,l_time, l_usnam, l_date.
Clear: w_newvalues, w_oldvalues.
**Start-Of-Selection**
Start-of-selection.
*Populating w_oldvalues workarea with old values from the table
Select single * from zaudit_t
Into w_oldvalues
Where belnr eq belnr_1
And gjahr eq gjahr_1
And bukrs eq bukrs_1. u201C where, belnr_1, gjahr_1, bukrs_1 are the fields on selection screen.
here we are populating w_newvalues workarea with new values
W_newvalues-f1 = w_oldvalues-f1
f2 = u2018XXXXXXXu2019 -
f3 = u2018YYYYYYYu2019
f4 = u2018ZZZZZZZu2019
l_tcode = sy-tcode.
l_time = sy-uzeit.
l_usnam = sy-uname.
l_date = sy-datum.
modify the table with new values***
MODIFY zaudit_t FROM w_submit.
IF sy-subrc EQ 0.
MESSAGE 'Document Updated' TYPE 'S'.
call function 'ZAUDIT_CD1_WRITE_DOCUMENT'
exporting
objectid = l_objectid
tcode = l_tcode
utime = l_time
udate = l_date
username = l_usnam
PLANNED_CHANGE_NUMBER = ' '
object_change_indicator = 'U' u201CU-update, I-insert, D-delete
PLANNED_OR_REAL_CHANGES = ' '
NO_CHANGE_POINTERS = ' '
upd_icdtxt_zaudit_cd = 'U'
n_zaudit_t = w_newvalues u201Cpass the work area containing new values
o_zaudit_t = w_oldvalues u201Cpass the work area containing old values
upd_zaudit_t = 'U' u201C this parameter gives the values in the columns(new value, old value and changed field name) of table CDPOS.
tables
icdtxt_zaudit_cd = t_cdtxt
ELSE.
MESSAGE 'Document Not Updated' TYPE 'S'.
ENDIF. u201CIF sy-subrc EQ 0. -
How to use the alv function module
hi all,
can any one help me out how to use reuse_alv_block_list_append function module, what parameters shall i pass to it, so that i get top of page and end of page events and report data in two blocks, can any one tell how can i didvide the data into block, at a particular linehi,
this is my simple alv blockedlist programme.go through it.it will definrtley help u.
REPORT z50870alv_blocked.
TYPE-POOLS : slis.
*& structure declaration
TYPES : BEGIN OF st_ekko,
ebeln TYPE ekko-ebeln, "Purchasing Document Number
bstyp TYPE ekko-bstyp, "Purchasing Document Category
bsart TYPE ekko-bsart, "Purchasing Document Type
aedat TYPE ekko-aedat, "record created on
ernam TYPE ekko-ernam, "Person who Created the Object
END OF st_ekko.
TYPES : BEGIN OF st_ekpo,
ebeln TYPE ekko-ebeln,
ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document
ematn TYPE ekpo-ematn, "Material number
matkl TYPE ekpo-matkl, "Material group
netpr TYPE ekpo-netpr, "Net price in purchasing document
END OF st_ekpo.
*& internal table and work area declaration
DATA : it_ekpo TYPE STANDARD TABLE OF st_ekpo,
it_ekko TYPE STANDARD TABLE OF st_ekko,
it_fieldcat1 TYPE slis_t_fieldcat_alv,
wa_fieldcat1 TYPE slis_fieldcat_alv,
it_fieldcat2 TYPE slis_t_fieldcat_alv,
wa_fieldcat2 TYPE slis_fieldcat_alv,
it_events Type slis_t_event,
wa_layout TYPE slis_layout_alv.
*& data declaration
DATA : v_ebeln TYPE ekko-ebeln.
*& selection-screen
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-000.
SELECT-OPTIONS : so_ebeln FOR v_ebeln.
SELECTION-SCREEN END OF BLOCK a.
*& At-selection-screen
at selection-screen on so_ebeln.
perform validate_ebeln.
*& start-of-selection
START-OF-SELECTION.
PERFORM data_retrieval.
*& end-of-selection
END-OF-SELECTION.
PERFORM initialize_alv_block.
PERFORM build_fieldcatalog1.
PERFORM build_fieldcatalog2.
PERFORM build_layout.
PERFORM get_events .
PERFORM append_ekkodata_to_alv_block.
PERFORM append_ekpodata_to_alv_block.
PERFORM display_blocked_alv.
*& FORM initialize_alv_block
FORM initialize_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid.
endform.
*& FORM validate_ebeln
form validate_ebeln.
select ebeln
from ekko
into table it_ekko
where ebeln in so_ebeln.
if sy-subrc ne 0.
message text-003 type 'W'.
endif.
endform.
*& FORM data_retrieval
FORM data_retrieval.
SELECT ebeln bstyp bsart aedat ernam
FROM ekko
INTO TABLE it_ekko
WHERE ebeln IN so_ebeln.
if sy-subrc ne 0.
message text-001 type 'I'.
endif.
SELECT ebeln ebelp ematn matkl netpr
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln IN so_ebeln.
if sy-subrc ne 0.
message text-002 type 'I'.
endif.
endform.
*& Form build_fieldcatalog1
FORM build_fieldcatalog1.
wa_fieldcat1-fieldname = 'EBELN'.
wa_fieldcat1-seltext_l = 'PURCHASE ORDER'.
wa_fieldcat1-col_pos = 0.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'BSTYP'.
wa_fieldcat1-seltext_l = 'DOCUMENT CATEGORY'.
wa_fieldcat1-col_pos = 1.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'BSART'.
wa_fieldcat1-seltext_l = 'DOCUMENT TYPE'.
wa_fieldcat1-col_pos = 2.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'AEDAT'.
wa_fieldcat1-seltext_l = 'DATE'.
wa_fieldcat1-col_pos = 3.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'ERNAM'.
wa_fieldcat1-seltext_l = 'NAME'.
wa_fieldcat1-col_pos = 4.
APPEND wa_fieldcat1 TO it_fieldcat1.
ENDFORM. "build_fieldcatalog
*& Form build_fieldcatalog2
FORM build_fieldcatalog2.
wa_fieldcat2-fieldname = 'EBELN'.
wa_fieldcat2-seltext_l = 'PURCHASE ORDER'.
wa_fieldcat2-col_pos = 0.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'EBELP'.
wa_fieldcat2-seltext_l = 'ITEM NUMBER'.
wa_fieldcat2-col_pos = 1.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'EMATN'.
wa_fieldcat2-seltext_l = 'MATERIAL TYPE'.
wa_fieldcat2-col_pos = 2.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'MATKL'.
wa_fieldcat2-seltext_l = 'MATERIAL GROUP'.
wa_fieldcat2-col_pos = 3.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'NETPR'.
wa_fieldcat2-seltext_l = 'NET PRICE'.
wa_fieldcat2-col_pos = 4.
wa_fieldcat2-do_sum = 'X'.
APPEND wa_fieldcat2 TO it_fieldcat2.
ENDFORM. "build_fieldcatalog
*& form build_layout.
FORM build_layout.
wa_layout-zebra ='X'.
wa_layout-no_vline = 'X'.
wa_layout-no_hline = 'X'.
wa_layout-colwidth_optimize = 'X'.
wa_layout-window_titlebar = 'PURCHASE ORDER HEADER AND ITEM DETAILS'.
ENDFORM. "build_layout
*& form append_ekkodata_to_alv_block
FORM append_ekkodata_to_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat1
i_tabname ='it_ekko'
it_events = it_events[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekko
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
*& form append_ekpodata_to_alv_block
FORM append_ekpodata_to_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat2
i_tabname ='it_ekpo'
it_events = it_events[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekpo
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
*& FORM display_blocked_alv.
FORM display_blocked_alv.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
endform.
*& Form GET_EVENTS
FORM get_events .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 2
IMPORTING
et_events = it_events[]
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " GET_EVENTS\
regards,
pavan t. -
How to use read_text function module
Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
thanks,
MaheDear,
Use below code.
DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
V_TDNAME LIKE THEAD-TDNAME.
V_TDNAME = PO_NUMBER.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = 'EN'
NAME = V_TDNAME
OBJECT = 'EKKO'
TABLES
LINES = IT_LINE.
Thanks and Regards, -
How to use another XSLT processor
Hello all,
Recently, I do need to use XSLT 2.0 processor, but how to install it to the JDK? Please give the detailed steps. And how to use it, just import the package? How to avoid the program to the old processor, because I doubt probably the old processor is part of the JDK. And how does this change impact to the java web service? And how do I change the web service about this change?
Thank you in advance.>
I want to use SaxonHE9.4.0.3 processor
>
Michael Kay provides extensive Installation instructions for all of his products. They are included in the documentation download.
Here is just a small part of what was provided for the version I use
>
Installation of Saxon simply involves unzipping the supplied download file into a suitable directory. The procedure is the same for the Standard product and the Schema-Aware product. The two products can co-exist in the same directory or in different directories.
One of the files that will be created in this directory is the principal JAR file. This is saxon8.jar in the case of Saxon-B, saxon8sa.jar in the case of Saxon-SA. There are additional JAR files to support optional features including the JDOM interface and the SQL interface. When running Saxon, the principal JAR file should be on the class path. The class path is normally represented by an environment variable named CLASSPATH: see your Java documentation for details. Note that the JAR file itself (not the directory that contains it) should be named on the class path. -
How to use the text module in script
hi,
i script how to use the text modules and how to write the code in layout of the script?Hi,
You canr use text modules in script. You have to use standard texts .
Standard text are maintained in SO10 transaction.
you can create translation text for other languages also . So based on logon language it will print translation text.
go to SO10
give textname it say Ztextname id as ST and language as EN
say create, then you will get editor there maintain your text and save it . then come back . Now change language (say for german DE) say create and eneter translation text and save it.
so now you have created a text called ztextname which you can use in your script.
Inorder to insert the texts in your script do as below
go to any window editor and select path
Insert->texts->symbols->standard symbols
then you will get popup in which you have to mention all the parameters that you have created earlier.
after inserting just change language EN to sy-langu
Reward points if useful
About text elements Sravan already given some informatiomn
Regards,
Nageswar -
How to use SET & GET Parameters in Module Pool
Hi Friends,
Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
Note : I will definitely give the marks for good responses.
Thanks in advance,
PradeepHi Pradeep,
You can save values in the SAP memory using a parameter ID. These
are user and terminal-session specific, but available to all internal and
external sessions.
SET Parameter copies the corresponding field contents into the SAP
System memory in the PAI processing block.
GET Parameter copies the corresponding field contents from the SAP
memory at the end of the PBO processing block, after data has been
transferred from the program, if the screen field still has its initial value
You can link an input/output field to an area of the SAP memory in the
ABAP Dictionary.
When you use an input/output field that is defined in the ABAP
Dictionary, its parameter ID is displayed in the Dictionary attribute
Parameter ID in the Screen Painter.
Usage
SET PARAMETER ID: CAR FIELD space,
CON FIELD space,
DAY FIELD space.
Here is the link that explains the usage of GET/SET in detail
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
Regards,
Sharadha
Maybe you are looking for
-
Macbook pro eject the dvd just after instering them. Eject button dont work
Hi there, I have a real problem with dvd drive. I inserted many CD/DVD into disk drive of my MBP but it eject them just after inserting even without reading them. It seems that eject button is stucked. So I forced a CD to stay in drive (I know I'm ..
-
Problem creating parent child relatioship in derby database
hi.i m trying to develop a code that can access two tables using derby database.The data in the tables should go from the JTable of GUI which i have prepared.To read both table's properties i m using two different instances of java.util.Properties.us
-
Problem to update 16 rows, it updates all rows in table
I tried to update 16 rows with AL as divion name with the script as below: Update wire_center a set a.wg_id='63' where EXISTS (select b.div_name from wire_center a, division b, district c, ns_workgroups d where B.DIV_NAME='AL' AND a.dis_id=c.dis_id a
-
Output Parameter cast problems
Wondering if anyone has seen this ... Migrating a data access layer (based on the MS DAAB) using the ODP.NET provider. I wrote my own parameter discovery code to dynamically configure parameters at runtime - just like the SqlCommandBuilder.DerivePara
-
I can not save or "Save as" under the same name, or any existing name. I get an error message about it being a read only file or some other user may have open (I am the only usre). I can only "save as" using a new file name.