Suppress xmlns:.. in the output
I try to use extension for using a Java class. I have add
xmlns:ptg="http://www.oracle.com/XSL/Transform/java/oracle.XSLJav
a".
The problem is I want to supress the namespace in the output.
Ex. Now I get the xmlns:ptg... (see below). How should I do to
remove this from the output?
<wml
xmlns:ptg="http://www.oracle.com/XSL/Transform/java/oracle.XSLJav
a">
<head>
</head>
</wml>
If I use jclarks XT for XSL-transformation and add
exclude-result-prefixes="ptg"
as an attribute to the xsl:stylesheet I don't get the xmlns:ptg..
but it don't seems to work for Oracle parser.
Regards
tomas y
PS.
I use version 2.0.2.4
DS
null
Tomas Yregrd (guest) wrote:
: How soon is soon? When should you release 2.0.2.5?
: Oracle XML Team wrote:
: : Tomas Yregrd (guest) wrote:
: : : I try to use extension for using a Java class. I have add
xmlns:ptg="http://www.oracle.com/XSL/Transform/java/oracle.XSLJav
: : : a".
: : : The problem is I want to supress the namespace in the
output.
: : : Ex. Now I get the xmlns:ptg... (see below). How should I
do
: to
: : : remove this from the output?
: : : <wml
xmlns:ptg="http://www.oracle.com/XSL/Transform/java/oracle.XSLJav
: : : a">
: : : <head>
: : : </head>
: : : </wml>
: : : If I use jclarks XT for XSL-transformation and add
: : : exclude-result-prefixes="ptg"
: : : as an attribute to the xsl:stylesheet I don't get the
: : xmlns:ptg..
: : : but it don't seems to work for Oracle parser.
: : : Regards
: : : tomas y
: : : PS.
: : : I use version 2.0.2.4
: : : DS
: : We have filed this to be fixed in v2.0.2.5, to be released
: soon.
: : Oracle XML Team
: : http://technet.oracle.com
: : Oracle Technology Network
v2.0.2.5 should be released before the end of the month.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null
Similar Messages
-
How to hide zeroes in the output
I need to suppress zeroes in the output. I have a Data template which selects the data from a view. The original view fields are showing 0's if the underlying value is null.( eg. create view v1 as select nvl(field1,0),nvl(field2,0)... from table1
I tried the following ways to fix the issue. But no success.
1. Changed the view and removed the NVL function on the view
create view v1 as select field1,field2,... from table1
After this the xml output is generated and shows nulls for these fields. But OPP is failing with 'Cannot convert to number' Here is the snapshot of the error.
Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.
at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
... 17 more
2. Using the xpath expression
<?format-number(field1[.!=0],"####", "")?>
This way I am seeing a square symbol for the fields having zeroes
I am sure there will be simpler way of hiding zeroes in the output. But I am not getting any clues. Any ideas.
ThanksHi,
I may have misunderstood something. In the option 1 you mention that by removing the nvl you were getting nulls?
If you are getting zeros then you should be able to use <?if:field1!=0?>...<?end if?>. It's possible you might need to put '0' around the value if it thinks it is text.
Also I'm not sure your format-number syntax is correct. It looks like you are mixing the Oracle formatting and the Microsoft formatting (ie when you set the form field type to number) together. I've used the following successfully:
<?format-number:FIELD1;'PT9G990D00'?>
Hope this helps.
Paul -
How to Suppress The Output of a SQL Query In Oracle 11gR2
Hi Friends,
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
For example:
SQL> set timing on;
SQL> SELECT objProp FROM aradmin.arschema WHERE (schemaId = 175);
OBJPROP+
--------------------------------------------------------------------------------+
*6\60006\4\0\\60008\40\0\60009\4\0\\60010\4\0\\60018\4\0\\600*
*22\4\68\1\63\AR:jRL#*
Elapsed: 00:00:00.00
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
Please help me at the earliest.
Regards,
Arijit>
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
>
How would that even be useful?
A query from a tool such as sql*plus is STILL going to send the output to the client and the client. You can keep sql*plus from actually displaying the data by setting autotrace to trace only.
But that TIME TAKEN is still going to include the network time it takes to send ALL rows that the query returns across the network.
That time is NOT the same as the actual execution time of the query. So unless you are trying to determine how long it takes to send the data over the network your 'timing' method is rather flawed.
Why don't you tell us WHAT PROBLEM you are trying to solve so we can help you solve it? -
Suppress the output of CONNECT command
Dear Friends,
Below is the code in of the shell scripts.
In the shell script,i connect to database to fetch the current SID.
There is no problem in connecting and fetching the SID value. But when i display the value of ORACLE_SID parameter, the value is "Connected. DEV".
My question here is how to supress the text "Connected." from the output i.e. the output of ORACLE_SID should be "DEV"
I have tried by giving "SET TERMOUT OFF" but it is not working.
I would like to know if there is a way to achieve this?
ORACLE_SID=`sqlplus -s /nolog << EOF
connect $SQL_LOGIN_PASSWD
set serveroutput on size 100000
set heading off
set pagesize 0
set feedback off
select upper(name) from $TABLE;
exit
EOF`Regards,
SreekanthSreekanth Munagala wrote:
Hi SB,
Below is the output when i try to execute in the way that u have posted in previous post. The output of your session and mine is different. Any idea on what might be the reason for this?No idea
bcm@bcm-laptop:~$ cat sample1.sh
SQL_LOGIN_PASSWD="dbadmin/admindb"
TABLE=v\$instance
FOOBAR=`sqlplus -s /nolog << EOF
connect $SQL_LOGIN_PASSWD
set serveroutput on size 100000
set heading off
set pagesize 0
set feedback off
select instance_name from $TABLE;
exit
EOF`
echo "ORACLE_SID: $FOOBAR"
bcm@bcm-laptop:~$ sh sample1.sh
ORACLE_SID: v112
bcm@bcm-laptop:~$ sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Wed Sep 14 20:18:07 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Enter user-name: dbadmin/admindb
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionEdited by: sb92075 on Sep 14, 2011 8:18 PM -
XSLT Mapping: URI appearing in each field entry in the output
Hi there,
I am mapping a custome build Invoice to xCBL structure in Stylus Studio. The output look ok, but in each field URI value appear as well, as shown below.
--Start
<p:msgDetails xmlns:p="http://localhost/webs/msgDetails.xsd">
<p:sender xmlns:p="http://localhost/webs/msgDetails.xsd"><p:senderId xmlns:p="http://localhost/webs/msgDetails.xsd">SCA HA</p:senderId><p:senderName xmlns:p="http://localhost/webs/msgDetails.xsd">SCA HA</p:senderName></p:sender><p:receiver xmlns:p="http://localhost/webs/msgDetails.xsd"><p:receiverId xmlns:p="http://localhost/webs/msgDetails.xsd">PEL</p:receiverId><p:receiverName xmlns:p="http://localhost/webs/msgDetails.xsd">Progressive Enterprise</p:receiverName></p:receiver><p:docType xmlns:p="http://localhost/webs/msgDetails.xsd">invoice</p:docType><p:docFormat xmlns:p="http://localhost/webs/msgDetails.xsd">xcbl40</p:docFormat><p:transmissionDetails xmlns:p="http://localhost/webs/msgDetails.xsd"><p:testMsg xmlns:p="http://localhost/webs/msgDetails.xsd">true</p:testMsg><p:transmissionDate xmlns:p="http://localhost/webs/msgDetails.xsd">2005-05-23 14:20:20</p:transmissionDate><p:messageId xmlns:p="http://localhost/webs/msgDetails.xsd">2005-05-23 14:20:20</p:messageId><p:username xmlns:p="http://localhost/webs/msgDetails.xsd"/><p:password xmlns:p="http://localhost/webs/msgDetails.xsd"/></p:transmissionDetails></p:msgDetails>
---End
The expected output is,
- Start
<p:msgDetails xmlns:p="http://localhost/webs/msgDetails.xsd">
<p:sender>
<p:senderId>SCA HA</p:senderId>
<p:senderName>SCA HA</p:senderName>
</p:sender>
<p:receiver>
<p:receiverId>PEL</p:receiverId>
<p:receiverName>Progressive Enterprises</p:receiverName>
</p:receiver>
<p:docType>invoice</p:docType>
<p:docFormat>xcbl40</p:docFormat>
<p:transmissionDetails>
<p:environmentFrom>dev</p:environmentFrom>
<p:testMsg>true</p:testMsg>
<p:transmissionDate>2005-05-18T11:14:06</p:transmissionDate>
<p:messageId>104435_2005-05-18T11:14:06</p:messageId>
<p:username></p:username>
<p:password></p:password>
</p:transmissionDetails>
</p:msgDetails>
--end
Its happening in the body area as well. Can somebody please suggest.
Thank you.
Warm Regards,
RanjanHi Ranjan,
You can resolve this in this way.
In ur xsl, delete the namespaces appearing. Then hardcode with ur hand the namespace like <p:msgDetails xmlns:p="http://localhost/webs/msgDetails.xsd">.
Make sure that the template match is coming before the
<p:msgDetails ..
Hope this helps out.
Rgds,
Deno -
How to generate the output of a BSP application in PDF format?
Hi,
I need to modify one BSP application, which generates its output in the form of PDF. I have checked all the methods in the bsp pages and its corresponding controller class's. I couldn't find any relevant method, which deals with generating the output in PDF.
Could you please share your valuable thoughts on this?
Again it would be helpful, If anyone of you share some knowledge on Interactive Adobe Forms.
Thanks,
John>
I am using oracle version 11.2.0.1, I have set a cronjob which will run on every 15 minutes and give us a log file mentioning the execution time taken for that SQL query:-
The above query will return the output as well as the time taken for execution of the query. I want to suppress the output of the query and only want the time taken to be printed. Is it possible by set commands. I have marked the output as bold and made it Italic.
>
How would that even be useful?
A query from a tool such as sql*plus is STILL going to send the output to the client and the client. You can keep sql*plus from actually displaying the data by setting autotrace to trace only.
But that TIME TAKEN is still going to include the network time it takes to send ALL rows that the query returns across the network.
That time is NOT the same as the actual execution time of the query. So unless you are trying to determine how long it takes to send the data over the network your 'timing' method is rather flawed.
Why don't you tell us WHAT PROBLEM you are trying to solve so we can help you solve it? -
Could not deliver the output for Delivery channel:null
XML Publisher Report Bursting Program is throwing the following exception
Log file
========
XML/BI Publisher Version : 5.6.3
Request ID: 11900899
All Parameters: Dummy for Data Security=Y:ReportRequestID=11900819:DebugFlag=Y
Report Req ID: 11900819
Debug Flag: Y
Updating request description
Updated description
Retrieving XML request information
Node Name:DB94
Preparing parameters
null output =/caop/app02/inst/apps/CAOP_db94/logs/appl/conc/out/o11900899.out
inputfilename =/caop/app02/inst/apps/CAOP_db94/logs/appl/conc/out/o11900819.out
Data XML File:/caop/app02/inst/apps/CAOP_db94/logs/appl/conc/out/o11900819.out
Set Bursting parameters..
Temp. Directory:/caop/app02/common/caopcomn/temp
[071713_110919401][][STATEMENT] Oracle XML Parser version ::: Oracle XML Developers Kit 10.1.3.1.0 - Production
[071713_110919410][][STATEMENT] setOAProperties called..
Bursting propertes.....
{user-variable:cp:territory=US, user-variable:cp:ReportRequestID=11900819, user-variable:cp:language=en, user-variable:cp:responsibility=21540, user-variable.OA_MEDIA=http://db172.coresys.com:17204/OA_MEDIA, burstng-source=EBS, user-variable:cp:DebugFlag=Y, user-variable:cp:parent_request_id=11900819, user-variable:cp:locale=en-US, user-variable:cp:user=PRAYAPUDI, user-variable:cp:application_short_name=XDO, user-variable:cp:request_id=11900899, user-variable:cp:org_id=0, user-variable:cp:reportdescription=Care One Salary Change Approval, user-variable:cp:Dummy for Data Security=Y}
Start bursting process..
Bursting process complete..
Generating Bursting Status Report..
Output File
========
<?xml version="1.0" encoding="UTF-8" ?>
- <BURS_REPORT>
<REQUESTID>11901286</REQUESTID>
<PARENT_REQUESTID>11901285</PARENT_REQUESTID>
<REPORT_DESC>Care One Salary Change Approval</REPORT_DESC>
<OUTPUT_FILE>/caop/app02/inst/apps/CAOP_db94/logs/appl/conc/out/o11901286.zip</OUTPUT_FILE>
- <DOCUMENT_STATUS>
<KEY />
<OUTPUT_TYPE>EXCEL</OUTPUT_TYPE>
<DELIVERY>email</DELIVERY>
<OUTPUT>/caop/app02/common/caopcomn/temp/071713_120851408/xdo1_2.xls</OUTPUT>
<STATUS>fail</STATUS>
<LOG>Error!! Could not deliver the output for Delivery channel:null . Please check the Log for error details..</LOG>
</DOCUMENT_STATUS>
</BURS_REPORT>
XML File
======
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Generated by Oracle Reports version 10.1.2.3.0 -->
<CAO_SAL_CHG_APR>
<LIST_G_EMAIL>
<G_EMAIL>
<EMAIL>[email protected]</EMAIL>
<LIST_G_MESSAGE_NUMBER>
<G_MESSAGE_NUMBER>
<MESSAGE_NUMBER>1</MESSAGE_NUMBER>
<PERCENT_CHANGE>-98.75</PERCENT_CHANGE>
<SALARY_CHANGE_AMT>-23,621.00</SALARY_CHANGE_AMT>
<DATE_CHANGE_MADE>07/16/2013</DATE_CHANGE_MADE>
<APPROVER_NAME>Veluz, Cynthia Avila</APPROVER_NAME>
<APPROVER_JOB>Administration|Center|Payroll/Benefits Coordinator</APPROVER_JOB>
<PERSON_NAME>Donet, Andrew P</PERSON_NAME>
<PERSON_NUM>131996</PERSON_NUM>
<LOCATION_CODE>HR - CareOne at Morris ALF</LOCATION_CODE>
<REGION_2>NJ</REGION_2>
<JOB_TITLE>Administration|Center|Director of Admissions</JOB_TITLE>
<CURRENT_ANNUAL_SAL>299.00</CURRENT_ANNUAL_SAL>
<PREVIOUS_ANNUAL_SAL>23,920.00</PREVIOUS_ANNUAL_SAL>
<PAY_BASIS>PERIOD</PAY_BASIS>
<CUR_PAY>11.50</CUR_PAY>
<CHANGE_DATE>07/21/2013</CHANGE_DATE>
<SALARY_CHANGE_REASON></SALARY_CHANGE_REASON>
<EMPLOYMENT_CATEGORY>Fulltime-Regular</EMPLOYMENT_CATEGORY>
<ERIC_WILLIAMS>[email protected]</ERIC_WILLIAMS>
</G_MESSAGE_NUMBER>
</LIST_G_MESSAGE_NUMBER>
</G_EMAIL>
</LIST_G_EMAIL>
</CAO_SAL_CHG_APR>
Control File
========
<?xml version="1.0" encoding="UTF-8" ?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
<xapi:request select="CAO_SAL_CHG_APR/LIST_G_EMAIL/G_EMAIL">
<xapi:delivery>
<xapi:email server="smtp.coresys.com" port="25" from="[email protected]" reply-to="[email protected]">
<xapi:message id="123" to="[email protected]"
attachment="true"
subject="Salaries Changed Yesterday">
Please do not reply to this email, it is system-generated.
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output="Care_One_Salary_Change_Approval" output-type="EXCEL" delivery="123">
<xapi:template type="rtf" location="xdo://CAO.CAO_SAL_CHG_APR.en.US/?getSource=true">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
It is greatly apprecaited, if you can take a look the issue.
Thank you,
-Pradeep.Hello Sir,
I am hard coding the Email id in the control file. From/To/CC emails I have hard coded. I want to paste the Control file... But I could not because, not allowing me to post XML content.
Thanks
<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
<xapi:request select="/EMPLOYEE_REPORT/EMPLOYEE">
<xapi:delivery>
<xapi:Email server="mycompanyserver" port="25" From="[email protected]" reply-to ="[email protected]">
<xapi:message id="123" to="[email protected]" cc="[email protected]"
attachment="true" subject="Employee Details for ${FULL_NAME}"> Mr./Ms. ${FULL_NAME}, Please review the attached document
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output-type="pdf" delivery="123">
<xapi:template type="rtf" location="xdo://XBOL.TEST_ABC_XML.en.US/?getSource=true">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
Edited by: user9367932 on Apr 13, 2010 4:59 AM
Edited by: user9367932 on Apr 13, 2010 4:59 AM -
How to get the Output File Name as One of the Field Value From Payload
Hi All,
I want to get the Output file name as one of the Field value from payload.
Example:
Source XML
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_TEST xmlns:ns0="http://sample.com">
- <Header>
<NAME>Bopanna</NAME>
</Header>
</ns0:MT_TEST>
I want to get the Output file name as " Bopanna.xml"
Please suggest me on this.
Regards
BopannaHi,
There are couple of links already available for this. Just for info see the below details,
The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
// Description: Function to create dynamic Filename
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
conf.put(key,a);
return "";
With this udf map it with the MessageType as
(File Name field from Payload) > DynamicFileConfiguration>MTReceiver
Thanks
Swarup -
Error!! Could not deliver the output for Delivery channel:null
Hi Friends,
XML/BI publisher : 5.6.3
Oracle Applications : R12.0.6
Bursting program Log file
==================
XML/BI Publisher Version : 5.6.3
Request ID: 993023
All Parameters: Dummy for Data Security=N:ReportRequestID=993022:DebugFlag=Y
Report Req ID: 993022
Debug Flag: Y
Updating request description
Updated description
Retrieving XML request information
Node Name:XXXXXGRP02
Preparing parameters
null output =/devrpi/applcsf/out/DEVRPI_auohscgrp02/o993023.out
inputfilename =/devrpi/applcsf/out/DEVRPI_auohscgrp02/o993022.out
Data XML File:/devrpi/applcsf/out/DEVRPI_auohscgrp02/o993022.out
Set Bursting parameters..
Temp. Directory:/tmp
[041210_040045855][][STATEMENT] Oracle XML Parser version ::: Oracle XML Developers Kit 10.1.3.130 - Production
[041210_040045859][][STATEMENT] setOAProperties called..
Bursting propertes.....
{user-variable:cp:territory=US, user-variable:cp:ReportRequestID=993022, user-variable:cp:language=en, user-variable:cp:responsibility=50537, user-variable.OA_MEDIA=https://appscgrpdev.oracleoutsourcing.com:443/OA_MEDIA, burstng-source=EBS, user-variable:cp:DebugFlag=Y, user-variable:cp:parent_request_id=993022, user-variable:cp:locale=en-US, user-variable:cp:user=Dev2, user-variable:cp:application_short_name=XDO, user-variable:cp:request_id=993023, user-variable:cp:org_id=90, user-variable:cp:reportdescription=Test_xml_bursting, user-variable:cp:Dummy for Data Security=N}
Start bursting process..
Bursting process complete..
Generating Bursting Status Report..
Bursting program Out put file
==================
Error!! Could not deliver the output for Delivery channel:null . Please check the Log for error details.Hello Sir,
I am hard coding the Email id in the control file. From/To/CC emails I have hard coded. I want to paste the Control file... But I could not because, not allowing me to post XML content.
Thanks
<?xml version="1.0" encoding="UTF-8"?>
<xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi">
<xapi:request select="/EMPLOYEE_REPORT/EMPLOYEE">
<xapi:delivery>
<xapi:Email server="mycompanyserver" port="25" From="[email protected]" reply-to ="[email protected]">
<xapi:message id="123" to="[email protected]" cc="[email protected]"
attachment="true" subject="Employee Details for ${FULL_NAME}"> Mr./Ms. ${FULL_NAME}, Please review the attached document
</xapi:message>
</xapi:email>
</xapi:delivery>
<xapi:document output-type="pdf" delivery="123">
<xapi:template type="rtf" location="xdo://XBOL.TEST_ABC_XML.en.US/?getSource=true">
</xapi:template>
</xapi:document>
</xapi:request>
</xapi:requestset>
Edited by: user9367932 on Apr 13, 2010 4:59 AM
Edited by: user9367932 on Apr 13, 2010 4:59 AM -
ALV- Changing the output data and saving in database
hi friends,
I have to change the material description in the output and have to save the changes in database..
For changing the description I have to raise a pop-up, then I have to give the required change and then save..
How to do it?
My code is as follows:
TABLES : vbrk,vbrp,vbpa,adrc.
TYPE-POOLS : slis.
DATA: w_report_id LIKE sy-repid.
DATA: w_title TYPE lvc_title VALUE 'DIPLAY CUSTOMER BILLING DOCUMENT'.
DATA: w_layout TYPE slis_layout_alv.
DATA: w_fieldcat TYPE slis_t_fieldcat_alv.
DATA: w_events TYPE slis_t_event.
DATA: w_header TYPE slis_t_listheader.
DATA: sum LIKE vbrk-netwr.
SELECT-OPTIONS:
erdat FOR vbrk-erdat,
vkorg FOR vbrp-vkorg_auft,
kunag FOR vbrk-kunag.
DATA : BEGIN OF itab OCCURS 0,
fkdat TYPE vbrk-fkdat,
kunrg TYPE vbrk-kunrg,
name1 TYPE adrc-name1,
vbeln TYPE vbrk-vbeln,
augru_auft TYPE vbrp-augru_auft,
netwr TYPE vbrk-netwr,
waerk TYPE vbrk-waerk,
vbtyp TYPE vbrk-vbtyp,
fkart TYPE vbrk-fkart,
END OF itab.
DATA itab1 LIKE STANDARD TABLE OF itab.
SELECT vbrkfkdat vbrkkunrg adrcname1 vbrkvbeln vbrp~augru_auft
vbrknetwr vbrkwaerk
INTO TABLE itab1
FROM ( ( ( vbrk INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln )
INNER JOIN vbpa ON vbpavbeln = vbrkvbeln )
INNER JOIN adrc ON adrcaddrnumber = vbpaadrnr )
WHERE vbtyp = 'O'
AND vbrk~erdat IN erdat
AND vbrp~vkorg_auft IN vkorg
AND vbrk~kunag IN kunag.
w_report_id = sy-repid.
PERFORM i_layout CHANGING w_layout.
PERFORM i_fieldcat CHANGING w_fieldcat.
SORT itab1 BY waerk fkart .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTRAINING2'
i_grid_title = w_title
is_layout = w_layout
it_fieldcat = w_fieldcat
i_save = 'A'
TABLES
t_outtab = itab1
EXCEPTIONS
program_error = 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.
*& Form i_fieldcat
text
-->P_W_FEILDCAT text
FORM i_fieldcat CHANGING p_w_feildcat.
DATA: l_line_fieldcat TYPE slis_fieldcat_alv.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'FKDAT'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-edit_mask = '__-__-____'.
l_line_fieldcat-seltext_m = 'Billing Document date '.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'KUNRG'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Cust no'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'NAME1'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Name of the reseller'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'VBELN'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Billing document number'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'AUGRU_AUFT'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Order reason'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'NETWR'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Amount'.
APPEND l_line_fieldcat TO w_fieldcat.
CLEAR l_line_fieldcat.
l_line_fieldcat-fieldname = 'WAERK'.
l_line_fieldcat-ref_tabname = 'ITAB1'.
l_line_fieldcat-seltext_m = 'Currency'.
APPEND l_line_fieldcat TO w_fieldcat.
ENDFORM. "i_fieldcat
*& Form i_layout
text
-->P_W_LAYOUT text
FORM i_layout CHANGING p_w_layout.
CLEAR w_layout.
w_layout-colwidth_optimize = 'X'.
w_layout-edit = 'X'.
ENDFORM. " i_layout
Thanks,
Revathi Raju.Check out the following link for top_of_page event in OOPs ALV.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
You can also check out the following program.
DATA: save_ok LIKE sy-ucomm,
g_container TYPE scrfname VALUE 'CC1',
g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
g_max TYPE i VALUE 100.
* declarations for top of page event
Data: gv_c_split type ref to cl_gui_splitter_container,
gv_c_ptv type ref to cl_gui_container,
gv_alv_ptv type ref to cl_gui_alv_grid,
o_dd_doc TYPE REF TO cl_dd_document,
text TYPE sdydo_text_element,
o_split type ref to cl_gui_easy_splitter_container,
o_top type ref to cl_gui_container,
o_bot type ref to cl_gui_container,
gv_c_vp type ref to cl_gui_container.
* end of declaration for top of page.
CLASS lcl_event_receiver DEFINITION DEFERRED.
*class lcl_application_dc definition deferred.
DATA: o_event_receiver TYPE REF TO lcl_event_receiver.
* g_dc type ref to lcl_application_dc.
DATA: gt_outtab TYPE TABLE OF sbook.
* CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_f4 FOR EVENT onf4 OF cl_gui_alv_grid
IMPORTING e_fieldname
es_row_no
er_event_data
et_bad_cells
e_display,
handle_top_of_page FOR EVENT top_of_page OF cl_gui_alv_grid
IMPORTING e_dyndoc_id.
METHODS: reset.
METHODS: show_f4.
PRIVATE SECTION.
* attributes for creating an own F4-Help
* (using a second ALV Grid Control
DATA: f4_grid TYPE REF TO cl_gui_alv_grid,
f4_custom_container TYPE REF TO cl_gui_custom_container.
TYPES: BEGIN OF ty_f4.
TYPES: value TYPE s_class.
TYPES: descr(20) TYPE c.
TYPES: END OF ty_f4.
DATA: f4_itab TYPE TABLE OF ty_f4.
DATA: f4_fieldcatalog TYPE lvc_t_fcat.
* attributes to store event parameters
* (after the CALL SCREEN command, the event parameters
* are not accessible)
TYPES: BEGIN OF onf4_event_parameters_type.
TYPES: c_fieldname TYPE lvc_fname.
TYPES: cs_row_no TYPE lvc_s_roid.
TYPES: cr_event_data TYPE REF TO cl_alv_event_data.
TYPES: ct_bad_cells TYPE lvc_t_modi.
TYPES: c_display TYPE char01.
TYPES: END OF onf4_event_parameters_type.
DATA: f4_params TYPE onf4_event_parameters_type.
* Methods to create own F4-Help
* (This is done using a second ALV Grid Control)
METHODS: init_f4.
METHODS: build_fieldcatalog.
METHODS: fill_f4_itab .
METHODS: on_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING es_row_no.
ENDCLASS. "lcl_application_f4 DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
*§2. Implement an event handler method for event ONF4.
METHOD handle_f4.
* Save event parameter as global attributes of this class
* (maybe solved differently if you use a function module!)
f4_params-c_fieldname = e_fieldname.
f4_params-cs_row_no = es_row_no.
f4_params-cr_event_data = er_event_data.
f4_params-ct_bad_cells = et_bad_cells.
f4_params-c_display = e_display.
*§3. Call your own f4 help. To customize your popup check
* first if the cell is ready for input (event parameter E_DISPLAY).
* (parameter E_DISPLAY is checked later in method on_double_click)
* (Probably, you would call a function module at this point,
* pass the needed event parameter and call the popup screen
* within that function module. This is not done in this example
* to avoid scattering its code).
CALL SCREEN 101 STARTING AT 10 10.
*§7. Inform the ALV Grid Control that an own f4 help has been processed
* to suppress the standard f4 help.
er_event_data->m_event_handled = 'X'.
ENDMETHOD. "on_f4
METHOD show_f4.
* DATA: ls_outtab TYPE sbook.
* initialize own f4 help if needed
IF f4_custom_container IS INITIAL.
CALL METHOD init_f4.
ENDIF.
CALL METHOD fill_f4_itab.
* refresh list of values in f4 help and show it
CALL METHOD f4_grid->refresh_table_display.
* CAUTION: Do not use method REFRESH_TABLE_DISPLAY for
* your editable ALV Grid instances while handling events
* DATA_CHANGED or ONf4. You would overwrite intermediate
* values of your output table on frontend.
* 'f4_grid' is a non-editable ALV Grid Control for the
* application specific F4-Help. Therefore, calling
* REFRESH_TABLE_DISPLAY for this instance has no
* negative effect.
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "show_f4
METHOD init_f4.
DATA: ls_f4_layout TYPE lvc_s_layo.
* build fieldcatalog entries for f4
CALL METHOD build_fieldcatalog.
* create controls
CREATE OBJECT f4_custom_container
EXPORTING container_name = 'CC_ONF4'.
CREATE OBJECT f4_grid
EXPORTING i_parent = f4_custom_container.
* hide toolbar
ls_f4_layout-no_toolbar = 'X'.
CALL METHOD f4_grid->set_table_for_first_display
EXPORTING
is_layout = ls_f4_layout
CHANGING
it_fieldcatalog = f4_fieldcatalog
it_outtab = f4_itab.
* register event double click on backend
SET HANDLER me->on_double_click FOR f4_grid.
* flush since 'ls_layout' is local!
CALL METHOD cl_gui_cfw=>flush.
ENDMETHOD. "init_f4
METHOD fill_f4_itab.
DATA ls_f4_itab TYPE ty_f4.
* Delete all entries in f4_itab to determine
* offered values dynamically
CLEAR f4_itab[].
ls_f4_itab-value = 'C'.
ls_f4_itab-descr = text-t03. "Business Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'Y'.
ls_f4_itab-descr = text-t04. "Economie Class
APPEND ls_f4_itab TO f4_itab.
ls_f4_itab-value = 'F'.
ls_f4_itab-descr = text-t05. "First Class
APPEND ls_f4_itab TO f4_itab.
ENDMETHOD. "fill_f4_itab
METHOD build_fieldcatalog.
DATA: ls_fcat TYPE lvc_s_fcat.
CLEAR ls_fcat.
ls_fcat-fieldname = 'VALUE'.
ls_fcat-coltext = text-t02.
* ls_fcat-inttype = 'S_CLASS'.
ls_fcat-outputlen = 5.
APPEND ls_fcat TO f4_fieldcatalog.
CLEAR ls_fcat.
ls_fcat-fieldname = 'DESCR'.
ls_fcat-coltext = text-t01.
ls_fcat-inttype = 'C'.
ls_fcat-outputlen = 20.
APPEND ls_fcat TO f4_fieldcatalog.
ENDMETHOD. "build_fieldcatalog
METHOD on_double_click.
*§5. If not already caught by your own f4 help, check whether
* the triggered cell was ready for input by using E_DISPLAY
* and if not, exit.
IF f4_params-c_display EQ 'X'.
LEAVE SCREEN.
ENDIF.
*§6. After the user selected a value, pass it to the ALV Grid Control:
*§ 6a. Define a field symbol of type: LVC_T_MODI and a structure of
* type LVC_S_MODI to pass the value later on.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
DATA: ls_modi TYPE lvc_s_modi,
ls_f4_itab TYPE ty_f4.
*§ 6b. Dereference attribute M_DATA into your field symbol and add
* the selected value to the table to which this symbol points to.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
ls_modi-row_id = f4_params-cs_row_no-row_id.
ls_modi-fieldname = f4_params-c_fieldname.
READ TABLE f4_itab INTO ls_f4_itab INDEX es_row_no-row_id.
ls_modi-value = ls_f4_itab-value.
APPEND ls_modi TO <itab>.
LEAVE TO SCREEN 0.
ENDMETHOD. "on_double_click
METHOD reset.
FIELD-SYMBOLS <itab> TYPE lvc_t_modi.
ASSIGN f4_params-cr_event_data->m_data->* TO <itab>.
CLEAR <itab>[].
ENDMETHOD. "reset
METHOD handle_top_of_page.
text = 'Top of page for program ZAMIT_SPLIT_CONTAINER'.
CALL METHOD e_dyndoc_id->add_text
EXPORTING text = text
sap_fontsize = 'LARGE'
sap_style = 'HEADING'.
CALL METHOD e_dyndoc_id->display_document
EXPORTING parent = o_top.
ENDMETHOD. "handle_top_of_page
ENDCLASS. "lcl_application_f4 IMPLEMENTATION
END-OF-SELECTION.
CALL SCREEN 100.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF g_custom_container IS INITIAL.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDIF.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
PERFORM exit_program.
WHEN 'SWITCH'.
PERFORM switch_edit_mode.
WHEN OTHERS.
* do nothing
ENDCASE.
ENDMODULE. "pai INPUT
* FORM EXIT_PROGRAM *
FORM exit_program.
LEAVE PROGRAM.
ENDFORM. "exit_program
*& Form build_fieldcat
* text
* -->PT_FIELDCAT text
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SBOOK'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
* Exchange smoker field with invoice field - just to
* make the dependance between SMOKER and CLASS more transparent
* (Smoking is only allowed in the first class).
IF ls_fcat-fieldname EQ 'SMOKER'.
ls_fcat-col_pos = 11.
ls_fcat-outputlen = 10.
ls_fcat-edit = 'X'.
* Field 'checktable' is set to avoid shortdumps that are caused
* by inconsistend data in check tables. You may comment this out
* when the test data of the flight model is consistent in your system.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'INVOICE'.
ls_fcat-col_pos = 7.
MODIFY pt_fieldcat FROM ls_fcat.
ELSEIF ls_fcat-fieldname EQ 'CLASS'.
ls_fcat-edit = 'X'.
ls_fcat-outputlen = 5.
ls_fcat-checktable = '!'. "do not check foreign keys
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form create_and_init_alv
* text
* -->PT_OUTTAB text
* -->PT_FIELDCAT text
FORM create_and_init_alv CHANGING pt_outtab TYPE STANDARD TABLE
pt_fieldcat TYPE lvc_t_fcat.
DATA: lt_exclude TYPE ui_functions,
ls_layout TYPE lvc_s_layo.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
* CREATE OBJECT g_grid
* EXPORTING i_parent = g_custom_container.
CREATE OBJECT gv_c_split
EXPORTING
* link_dynnr = lv_dynnr
* link_repid = lv_repid
parent = g_custom_container
rows = 2
columns = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3 .
CALL METHOD gv_c_split->set_border
EXPORTING
border = space.
CALL METHOD gv_c_split->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = gv_c_ptv.
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 1
height = 20
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 6 .
CALL METHOD gv_c_split->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = gv_c_vp .
CALL METHOD gv_c_split->set_row_height
EXPORTING
id = 2
height = 10
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3 .
CREATE OBJECT o_split
EXPORTING
parent = gv_c_ptv
with_border = 1
EXCEPTIONS
cntl_error = 1
cntl_system_error = 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.
o_top = o_split->top_left_container.
o_bot = o_split->bottom_right_container.
CREATE OBJECT gv_alv_ptv
EXPORTING
i_parent = o_bot
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
CREATE OBJECT g_grid
EXPORTING
i_parent = gv_c_vp
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5 .
PERFORM build_fieldcat CHANGING pt_fieldcat.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM exclude_tb_functions CHANGING lt_exclude.
PERFORM build_data CHANGING pt_outtab.
ls_layout-grid_title = 'F4 help implemented for field CLASS'.
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_top_of_page FOR gv_alv_ptv.
SET HANDLER o_event_receiver->handle_top_of_page FOR g_grid.
CREATE OBJECT o_dd_doc EXPORTING style = 'ALV_GRID'
no_margins = 'X'.
CALL METHOD gv_alv_ptv->set_table_for_first_display
EXPORTING
is_layout = ls_layout
CHANGING
it_outtab = pt_outtab[]
it_fieldcatalog = pt_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
it_toolbar_excluding = lt_exclude
is_layout = ls_layout
CHANGING
it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab[].
CALL METHOD gv_alv_ptv->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_dd_doc.
* register f4 for field CLASS
PERFORM register_events.
* Set editable cells to ready for input initially
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form exclude_tb_functions
* text
* -->PT_EXCLUDE text
FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA ls_exclude TYPE ui_func.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND ls_exclude TO pt_exclude.
ls_exclude = cl_gui_alv_grid=>mc_fc_loc_move_row.
APPEND ls_exclude TO pt_exclude.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_data
* text
* --> p1 text
* <-- p2 text
FORM build_data CHANGING pt_outtab TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_index TYPE i.
SELECT * FROM sbook INTO TABLE gt_outtab UP TO g_max ROWS.
IF sy-subrc NE 0.
PERFORM generate_entries CHANGING pt_outtab.
ENDIF.
LOOP AT pt_outtab INTO ls_sbook.
l_index = sy-tabix.
CLEAR ls_sbook-class.
* Alternate between smoker and non smoker to make
* it more obvious what this example is about
l_index = l_index MOD 2.
IF l_index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = ' '.
ENDIF.
MODIFY pt_outtab FROM ls_sbook.
ENDLOOP.
ENDFORM. " build_data
*& Form generate_entries
* text
* -->PT_SBOOK text
FORM generate_entries CHANGING pt_sbook TYPE STANDARD TABLE.
DATA: ls_sbook TYPE sbook,
l_month(2) TYPE c,
l_day(2) TYPE c,
l_date(8) TYPE c,
l_prebookid TYPE i.
ls_sbook-carrid = 'LH'.
ls_sbook-connid = '0400'.
ls_sbook-forcurkey = 'DEM'.
ls_sbook-loccurkey = 'USD'.
ls_sbook-custtype = 'B'.
DO 110 TIMES.
l_prebookid = sy-index.
ls_sbook-forcuram = sy-index * 10.
ls_sbook-loccuram = ls_sbook-loccuram * 2.
ls_sbook-customid = sy-index.
ls_sbook-counter = 18.
ls_sbook-agencynum = 11.
l_month = sy-index / 10 + 1.
DO 2 TIMES.
l_day = 3 + l_month + sy-index * 2.
l_date+0(4) = '2000'.
l_date+4(2) = l_month.
l_date+6(2) = l_day.
ls_sbook-fldate = l_date.
SUBTRACT 3 FROM l_day.
ls_sbook-order_date+0(6) = l_date+0(6).
ls_sbook-order_date+6(2) = l_day.
ls_sbook-bookid = l_prebookid * 2 + sy-index.
IF sy-index EQ 1.
ls_sbook-smoker = 'X'.
ELSE.
ls_sbook-smoker = space.
ENDIF.
ls_sbook-luggweight = l_prebookid * 10.
IF ls_sbook-luggweight GE 1000.
ls_sbook-wunit = 'G'.
ls_sbook-class = 'C'.
ELSE.
ls_sbook-wunit = 'KG'.
ls_sbook-class = 'Y'.
ENDIF.
IF ls_sbook-bookid > 40 AND ls_sbook-wunit EQ 'KG'.
ls_sbook-invoice = 'X'.
ENDIF.
IF ls_sbook-bookid EQ 2.
ls_sbook-cancelled = 'X'.
ls_sbook-class = 'F'.
ENDIF.
APPEND ls_sbook TO pt_sbook.
ENDDO.
ENDDO.
ENDFORM. " generate_entries
*& Form register_events
* text
FORM register_events.
*§1. Register event ONF4 at frontend using method
* register_f4_for_fields. For this purpose, you pass a table
* with all fields, for which you want to implement your own
* f4 help.
* remark: If you want to use an own f4 help for fields where
* no standard f4 help exists set field F4AVAILABL for
* this field in the fieldcatalog.
DATA: lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
CLEAR lt_f4.
lt_f4-fieldname = 'CLASS'.
* If you would like to deregister the field again,
* pass value SPACE with field 'register'.
lt_f4-register = 'X'.
*§ 1b. If the value range in your f4 help depends on other
* values of cells that are input enabled, set the
* GETBEFORE parameter.
* The consequence is that the ALV Grid Control raises
* event DATA_CHANGED before the f4 help is called to
* check values that the f4 help depends on.
lt_f4-getbefore = 'X'.
* The next parameter is used to change values after onf4 has
* been processed. The ALV Grid Control will raise
* event DATA_CHANGED afterwards, if you set it.
lt_f4-chngeafter = space.
INSERT TABLE lt_f4.
CALL METHOD g_grid->register_f4_for_fields
EXPORTING
it_f4 = lt_f4[].
* register events for abap objects (backend)
SET HANDLER o_event_receiver->handle_f4 FOR g_grid.
ENDFORM. " register_events
* MODULE status_0101 OUTPUT
MODULE status_0101 OUTPUT.
SET PF-STATUS 'POPUP'.
SET TITLEBAR 'POPUP'.
CALL METHOD o_event_receiver->show_f4.
ENDMODULE. " STATUS_0101 OUTPUT
*& Module USER_COMMAND_0101 INPUT
* text
MODULE user_command_0101 INPUT.
PERFORM user_command.
ENDMODULE. " USER_COMMAND_0101 INPUT
*& Form user_command
* text
FORM user_command.
DATA: save_ok TYPE sy-ucomm.
save_ok = sy-ucomm.
CLEAR sy-ucomm.
CASE save_ok.
WHEN 'CANCEL'.
CALL METHOD o_event_receiver->reset.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM. "user_command
*& Form switch_edit_mode
* text
FORM switch_edit_mode.
IF g_grid->is_ready_for_input( ) EQ 0.
* set edit enabled cells ready for input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
ELSE.
* lock edit enabled cells against input
CALL METHOD g_grid->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
ENDIF.
ENDFORM. "switch_edit_mode
For popup try this
reward if helpfull
Regards
Pavan -
How to remove xmlns="" from the message
some reason on the header node in the below message gets xmlns="" when the message is generated from BPEL.
below is the output that generated. I want to remove xmlns="" from the message.
<?xml version="1.0" ?><ProductMovementReport xmlns="urn:cidx:names:specification:ces:schema:all:4:0" Version="4.0">
<Header xmlns="">
<ThisDocumentIdentifier>
<DocumentIdentifier>42519</DocumentIdentifier>
</ThisDocumentIdentifier>
<ThisDocumentDateTime>
Can anybody help me please ?It's is missing my blog article :-)
Here it is:
<?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="comment()|processing-instruction()|/"><xsl:copy><xsl:apply-templates/></xsl:copy></xsl:template><xsl:template match="*"><xsl:element name="{local-name()}"><xsl:apply-templates select="@*|node()"/></xsl:element></xsl:template><xsl:template match="@*"><xsl:choose><xsl:when test="name() != ''xmlns''"><xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute></xsl:when></xsl:choose></xsl:template></xsl:stylesheet>'; -
How to remove namespace link from the output XML
i have to remove 'xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions"' (namespace) from the output xml file which is generated from the BIP. I need my output XML file without that namespace link, this namespace link is coming for each element.
Anybody know how to do that please help.
output xml file
<?xml version="1.0" encoding="UTF-8" ?>
<Reports version="2.00">
<deliveryNote xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
<subjectId />
</deliveryNote>
<deliveredReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
<referDate>[Delivery note->H4]</referDate>
</deliveredReports>
<simpleReports xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions">
<numberOfReports>2</numberOfReports>
<nReport>
<reportName>Xyz</reportName>
<reportVersion>1.0</reportVersion>
<observations>
<numberOfObservations>15</numberOfObservations>
<columnObservation>
<y>9</y>
<rO>
<x>14</x>
<o>11</o>
<o>21</o>
<o>121</o>
</rO>
</columnObservation>
</observations>
</nReport>
</simpleReports>
</Reports>
my xslt file
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.apps.xdo.template.rtf.XSLTFunctions" >
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:element name="Reports">
<xsl:attribute name="version">2.00</xsl:attribute>
<deliveryNote>
<subjectId></subjectId>
</deliveryNote>
<deliveredReports>
<referDate>[Delivery note->H4]</referDate>
</deliveredReports>
<simpleReports>
<numberOfReports>2</numberOfReports>
<nReport>
<reportName>Xyz</reportName>
<reportVersion>1.0</reportVersion>
<observations>
<numberOfObservations>15</numberOfObservations>
<columnObservation>
<y>9</y>
<rO>
<x>14</x>
<xsl:for-each select="TEST_XML/LIST_R1/R1">
<o><xsl:value-of select="xdoxslt:lpad(COL1,10,' ')"/></o>
</xsl:for-each>
</rO>
</columnObservation>
</observations>
</nReport>
</simpleReports>
</xsl:element>
</xsl:template>
</xsl:stylesheet>Please post the same in BI Publisher forum
BI Publisher
Thanks,
Vino -
How to suppress a property being output to a label once a date has been reached
Hi,
I would like to suppress a property being output to a label once a date has been reached. I have tried the WWI conditional output functionality but am experiencing issues.
The issue is the symbols I am wanting to use have different expansion times.
For example:
The property contains a CHAR30 phrase-related characteristic and a DATE FORMAT characteristic.
I only want to output the phrase if the current date the label is printed is the same or later than the date assigned in the property.
When I try to create the conditional output:
<11BRG200(M,ZSAP_EHS_1011_014;*)>
<15BIF100(AND:01GZE1_ZE145 GE S:02EHS_RPPRIN)><01GZE1_ZE10G(P;*)[D:Grant
No.]> <15EIF100>
<11ERG200>
On checking the template, I get the message 'Repeating group IF 100: Different expansion times for condition symbols'
SAP Help does tell me that:
· If you enter a number of symbols in the condition, these must all have the same expansion time. If you require a conditional output that is dependent on symbols with different expansion times, you have to nest a number of conditional outputs.
Does anyone know how I can achieve this?
Best regards
Karen WaterworthHi Michael
I will try that as the date is unlikely to be changed (unless incorrect), and it is exactly what we are wanting to achieve, only output the Grant number when printing the label if the expiry date has not been reached.
Example of data held in SAP:
Header 1
Header 2
Grant No.
US 5,590,111
Country
US
Expiry Date
01.01.2035
Usage
LABEL: US
Grant number only output until expiry date reached (ie earlier or same date, not later as I put in my question!)
Thank you
Karen -
How to get required tags and name spaces in the output File?
Hello,
I am doing IDOC to File sceanrio and I am able to get the file but the problem is that I am unable to get the required tag names. Out put file is having ns0 ns1 and so on..
Eg:
ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CU_NET_WEIGHT</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>EAN_SKU</ns2:ID></ns2:MaterialDefinitionProperty><ns2:MaterialDefinitionProperty><ns2:ID>CUPerCase</ns2:ID>
and so on..
Source structure is IDOC
Target structure is External Defination imported with references.
How can I get the output file with the exact namespaces and tags as imported through External Definations.
Thanks in Advace.HI! Rajeev,
I have gone through this forum and we having 100% same to same requirement here in my project.
We want this at the top of the Output Payload..
<?xml version="1.0" encoding="UTF-8" ?>
- <SyncMaterialDefinition xmlns="http://www.siemens.com/ad/mes/b2mt-1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bml="http://www.wbf.org/xml/b2mml-v02" xmlns:sit="http://www.siemens.com/ad/mes/b2mml-v02-SITExt-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oag="http://www.openapplications.org/oagis">
- <oag:ApplicationArea>
and also isome part of payload nstead of ns0: and ns1:
we want it as below for some part of same output payload
<oag:ApplicationArea>
- <oag:Sender>
<oag:LogicalId>SAP</oag:LogicalId>
<oag:Component>PMConnector</oag:Component>
<oag:ReferenceId />
<oag:Confirmation>Always</oag:Confirmation>
</oag:Sender>
<oag:CreationDateTime>2009-06-14T22:23:29.42Z</oag:CreationDateTime>
</bml:MaterialDefinitionProperty>
- <bml:MaterialDefinitionProperty>
<bml:ID>XXXXXXX</bml:ID>
- <bml:Value>
<bml:ValueString>0.0</bml:ValueString>
<bml:DataType>string</bml:DataType>
<bml:UnitOfMeasure>n/a</bml:UnitOfMeasure>
<bml:Any />
*</bml:*Value>
Check the above code how we want but we are getting in normal way .
Could you please review this and guide me in detailed way how to do in a step by step manner if possible by taking my above payload condition.
Regards:
Amar Srinivas Eli -
Bind the output data (Xml) from BPEL process to ADF SelectOneChoice Control
Hello,
My requirement is to invoke a BPEL process from ADF page and display returned results in a select one choice (drop down box).
I have created a Data Control for the BPEL process through Web service data control and tried to invoke the BPEL process. I could see from the BPEL console that BPEL process is getting invoked. But the ADF doesn't bind any of the output to Select one choice.
It doesn't even show any error.
Can you plz help me how to bind the output of the BPEL process to ADF SelectOneChoice control.
The Xml Which I recieve from BPEL process is
<outputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><DBConnectDemoProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/DBConnectDemo">
<StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
<transId>1</transId>
<fromStatus>Open</fromStatus>
<toStatus>Assigned</toStatus>
</StatusTrans>
<StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
<transId>2</transId>
<fromStatus>Open</fromStatus>
<toStatus>Pending</toStatus>
</StatusTrans>
<StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
<transId>3</transId>
<fromStatus>Open</fromStatus>
<toStatus>Closed</toStatus>
</StatusTrans>
<StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
<transId>4</transId>
<fromStatus>Open</fromStatus>
<toStatus>Cancelled</toStatus>
</StatusTrans>
</DBConnectDemoProcessResponse>
</part></outputVariable>
And the toStatus node values viz, Assigned, Pending, Closed, Cancelled should get binded to the SelectOneChoice control
Waiting for your valuable inputs,
Regards,
babloo.I have been still trying for the solution. I have modified the XSD created by the jdeveloper to,
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/StateTransitions"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="StateTransitionsProcessRequest">
<complexType>
<sequence>
<element name="input" type="string"/>
</sequence>
</complexType>
</element>
<element name="StateTransitionsProcessResponse">
<complexType>
<sequence maxOccurs="unbounded">
<element name="stateChanges">
<complexType>
<sequence>
<element name="fromState" type="string" />
<element name="toState" type = "string" />
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
And I have given this XSD url while creating the Web Service Data Control by deploying it into the Oracle App server.
So, I can see the tree structure of "Return" as "StateTransitionsProcessResponse->StateChanges->toState,fromState"
I have binded the toState field of the Data Control to the SelectOneChoice ADF control in a jspx page by using List binding editor.
I have selected,
Base data source as "Variables" (Currently I don't need to update any table),
List Data source as "process: getStateTransitions.process.StateTransitionsProcessResponse.stateChanges" (Web Service Data Control)
Base Data source attribute as "process_input"
List Data Source Attribute as "toState"
I can initiate the web service (BPEL process) by providing the necessary input value like 'Open' or 'Pending' or 'Assigned' but the SelectOneChoice control doesn't populate with any values.
Waiting for valuable inputs!
Thanks and Regards,
babloo.
Maybe you are looking for
-
Hello, I'm having probelms backing up my information to my iCloud account. I tried to reset the account and erase everything in my account but the problem is still there. The problem is that my iPhone is not able to complete the backup process and al
-
The detail log (mapping, payload) in BPM
This is my scenario: SAP <-> XI <-> JDBC, because I need to use for-each component, so I used BPM and I used multiline component too. Current status is, I can see the detail message mapping and payload through SXMB_MONI, but I can only see the messag
-
Wsdl - soap response...
I am working on java ,using Eclipse wit wtp and Apache Axis. The soap request is sent, an xml file is parsed and I want to generate soap responses from the xml file. Now i can send a soap request, parse the xml, but the response am getting is not of
-
XI Demo Configuration - problems
Dear all, I have some problems running the XI Demo. 1. CheckFlightAvailibility: While checking availibility I get this error message: Unable to check flight availability. Error Type: XI system error Error Details: Die HTTP-Destinatio
-
hello I am creating a scenario of File to RFC, Using BPM where in again input from File and updating using RFC in multiple steps...( Not creating a scenario of FTP to RFC to FTP ) do i have any web-blog or step wise guide for above scenario Regards