[background] Simple Transformations - sheetname with table's field Value
<tt:loop ref=".table">
<Worksheet ss:Name="">
<Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="25" x:FullColumns="1" x:FullRows="1">
<Column ss:Width="120"/>
<Column ss:Width="220"/>
<Column ss:Width="220"/>
<Row>
<Cell></Cell>
<Cell>
<Data ss:Type="String">
<tt:value ref="matnr"/>
</Data>
</Cell>
<Cell>
<Data ss:Type="String">
<tt:value ref="maktx"/>
</Data>
</Cell>
</Row>
</Table>
</Worksheet>
</tt:loop>
DATA:BEGIN OF itab OCCURS 0 ,
matnr(2) type c,
maktx(2) type c ,
sheet(2) TYPE c,
END OF itab.
how to fill worksheet'ss:name with table's sheet , I want to many sheet in one excel,and sheetname with table's field Value
Tim,
See may answer to your other thread:
Re: constant value
Charles.
Similar Messages
-
Define structure with table type fields using keyword "TYPES"
Hi Gurus,
Using keyword "TYPES", I want to define a structure in which there is a field must be table type. It seems not allowed. For example:
TYPES tt_items TYPE TABLE OF sflight.
TYPES: BEGIN OF str,
field1 TYPE i,
field_tabl TYPE tt_items.
TYPES: END OF str.
Then I got a syntax error:
"TT_ITEMS" is a generic type. Use of this type is only possible for typing field symbols and formal parameters. -
What should I do if I want to have a table type field in it?
Thanks a lot.include type EKKO includes the whole strucutre of EKKO.
if you see the structure in debug mode, it_ekko contains the fields of EKKO as well as the field CHK of type C.
In your case you can do this
TYPES: BEGIN OF str.
INCLUDE TYPE sflight. " includes whole structure of SFLIGHT
TYPES : field1 TYPE i. " include the field1 of type I
TYPES: END OF str.
DATA : it_str TYPE TABLE OF str, " internal table
is_str TYPE str. " work area
Regards
Gopi -
Issue with new Custom field value in Material UI (EHP5)
Hi
We added new Custom field (country) in material UI for Routing the WF based on country.
we added this new field in material general data, When user press the "check" button in the header the value disappeared in the UI.
This field value required only in MDG CR level, this field value will not be updated in ECC active area.
Request your inputs to solve this problem.resolved myself:
PROCESS BEFORE OUTPUT.
* Verarbeitung vor der Ausgabe
*MS17092009 Non eliminare modules standard.
MODULE set_propriety.
MODULE INIT_SUB.
MODULE GET_DATEN_SUB.
PROCESS AFTER INPUT.
* Verarbeitung nach der Eingabe
MODULE GET_DATEN_SUB.
CHAIN.
FIELD MARA-ZBARCODE.
ENDCHAIN.
MODULE SET_DATEN_SUB.
FIELD MARA-ZBARCODE MODULE BARCODE_0001 ON INPUT. -
Help me with table and fields in SD
Hi gurus,
please find me these tables fields.
Sales Document Number
Req Delivery Date
Delivery Order Document
Billing Document Number
Billing Date
Gross Sales
Pallets Discount
Trade Discount
Commission Fees
Royalty Fees
Management Fees
each answer will b fully rewarded.
thanksHi,
Sales Document Number - VBAK-VBELN
Req Delivery Date - VBAK-VDATU
Delivery Order Document - LIKP-VBELN
Billing Document Number - VBRK-VBELN
Billing Date - VBRK-FKDAT
Regards,
Himanshu -
How to display another table's field value with an LOV?
Hi all!
On my JSP application I'm using an LOV based on 2 tables (datasources). I take the EMP and DEPT tables as an example:
The user can click on the LOV button to select a department for a specific employee. I use the following code for the LOV:
<jbo:DataSource id="dsEmp" appid="am" viewobject="EmpView" />
<jbo:DataSource id="dsDept" appid="am" viewobject="DeptView" />
<jbo:InputSelectLOV datasource="dsEmp" dataitem="DeptId" displaydatasource="dsDept" displaydataitem="Id,Dname" displayvaluedataitem="Id" formname="my_form" />
So, the LOV windows shows the ID and Department Name from the DEPT table and returns Dept.Id into Emp.DeptId. This works fine but in the Edit JSP I want to display the Department Name instead of the Department Number. I don't know how I can pick the Department Name from the DEPT table. I tried to change the displayvaluedataitem="Name" but, as I thought, this didn't work.
Is there any possibility to handle this problem?!
PS: I'm using Oracle9i JDeveloper.
Thanks a lot!Tim,
See may answer to your other thread:
Re: constant value
Charles. -
BDC steps differ when inputing same record with different other field value
CODEDATE--
ETC...(there is of course other field)
11----01.10.2007 (do process A C D)
12----01.10.2007 (do process A C D)
12----01.11.2007 (Having same code field so do process A B C D)
13----01.11.2007 (do process A C D)
14----01.10.2007 (do process A C D)
15----01.11.2007 (do process A C D)
15----01.12.2007 (Having same code field so do process A B C D)
16----01.10.2007 (do process A C D)
hi i am doing a BDC batch my input table a bit like above.
first record will do process A C D
second record will do process A C D
thirt record will do process A B C D
second record will do process A C D
Any hint of how i can do that plzzzz . Urgent helppp neededas per understanding,
if code = 11 and date = 01.10.2007 then u need process A C and D right.
define 4 subrountine with A B C D logics.
define one more subroutine with SR1 and SR2.
inside SR1 call 3 subroutines A C D
and SR2 call A B C D.
if code = 11 and date = 01.10.2007 then
call subroutine SR1,
if if code = 12 and date = 01.11.2007 then call Subroutine SR2.
if u have any issue, let me know the detailed requirement. -
How to find roles with certain org field values?
agr_1252 holds its values in Low and High fields. So if I want to discover roles giving visibility to certain $RSINFOAREA such as LRDR* and MRT, how to do it? Most roles in our system use ranges in the org.fields, such as 0DA - ZL*, so I would need to identify these and change the ranges to prevent visibility to our sensitive infoareas. But I don't see a way to do this with SQVI and there are no canned reports in SUIM. Has anyone faced and solved this b4?
Hi
It seems to me at least on my system that RSINFOAREA is not an org element field - and in your landscape it has been changed into an org field. You can receive values of RSINFOAREA field either from agr_1251 or agr_1252 - depending upon the status of the field. Now after you have obtained value in ranges - you can see the exact individual values contained in ranges through table RSDAREA (Directory of InfoAreas) - hope this will help you.
Best Regards
Prashant -
Trigger a workflow with the Owner field value
Hi
I need to trigger a WF when Owner = abc.
I have tried all the possible ways like [<Owner>]="abc", fieldvalue('<Owner>')='abc', but the WF is not getting triggered. If anyone has an idea on what is going wrong and how it can be rectified, Kindly help
Thank you
MeenaI fought this for a while but was able to get it to work. You need to use the following syntax:
([<OwnerId>] = 'RowIDThatYouWantToTriggerOffOf')
In order for you to test the workflow you need to log out of CRMOD and re-login. This is key because if you skip this step it appears that your change did not work.
Hope this resolved this for you.
Neal G. -
Simple transformation with reference to ddic structures
Hi, experts,
we decide to use xml as the format when exchanging massive data with other applications. and we want to use simple transformation because according to the document it's more fast.
actually our file structure is determined by certain ddic structures, one xml file main contain several ddic structures , and they are all flat one, not deep structure.
the xml file may look like this:
<data>
<ddic1>[components of ddic structure 1 ]</ddic1>
<ddic2>[components of ddic structure 2 ]</ddic2>
</data>
i am new to ST,i am wondering that is it possible to make the ST more easy with the help of ddic structure? do i still need to declare the components one by one in the ST program?
BR.
junIt only runs ok with 2 internal tables because of the way you set up the XML string. It will run ok with 3 internal tables too. If you strip out the '<C>' nodes or move the '<C>' nodes around, you'll see what I mean (move the C nodes to the last B node). Each time you start a loop in a simple transformation, the internal table is initialized. So, you need to form your sample XML string differently, declare your internal tables differently (nested), or use XSLT for a little more power.
-
Simple transformation dropping trailing zero.
Hi experts.
I am having a problem with my transformation file, and I was hoping someone could help me.
I have created a simple transformation file, with a variable using the type of "DMBTR" which Does have 2 decimal points.
IF I have data - the two decimal points print.
EG if the amount is 100.57.. I get the 100.57 to print which is what I need and expect.
BUT.
IF the amount is 100.50 I am getting 100.5 Is is dropping the final zero amount, and therefore is failing in the validation.
HOW can I FORCE the two decimal points to print?
I have even tried it where I declare it as a variable of type "I" with 2 decimal points, and it still does not work.
I can not figure out how to use the Number format option with a Value-ref print line.
If someone could help me with that.. I could try that to see if it worked.
thank you.
eg: of the way the data is declared:
<tt:type name="GRTOT14" type="I" length="13" decimals="2"/>
OR
<tt:type name="GRTOT16" type="ddic:DMBTR"/>
<tt:type name="GRTOT17" type="ddic:DMBTR"/>
eg: of the way I am using it where I am getting only one decimal place if the 2nd decimal place is ZERO
<tot_grnt_sbsdy_amt tt:value-ref=".GRTOT14"/>
<tot_insu_prcd_amt tt:value-ref=".GRTOT16"/>
<tot_opay_rcap_amt tt:value-ref=".GRTOT17"/>
PLEASE HELP.
thank you.From what I understand about XML (could be more), the canonical representation of decimal values does not allow a fixed number of decimal places.
SAP documentation:
http://help.sap.com/saphelp_nw04/helpdata/en/52/491a40251e2402e10000000a1550b0/frameset.htm
from there, this XML documentation is referenced:
http://www.w3.org/TR/xmlschema-2/#decimal
important bit:
Leading and trailing zeroes are prohibited subject to the following: there must be at least one digit to the right and to the left of the decimal point which may be a zero.
You already discarded my workaround: using a character or string type field and fill it to your liking prior to serialisation.
Thomas -
How to create a pdf/a-1b with a text field
hello, I'm trying to execute a very simple task: create a pdf/a-1b containig a text field.
using Acrobat XI pro, I created a simple pdf form with 1 form field of type text , then tried to save as pdf/A-1b. The pdf is saved but the form field is removed from resulting pdf.
Here in detail the steps I made:
0) configure adobe pdf printer to save as pdf/A-1b
1) creat a test.txt with notepad
2) print using acrobat pdf printer
3) open the generated pdf with Acrobat XI
4) in 'Standards' panel I see that pdf conform
5) now go to 'Tools\Modules' and 'Modify'
6) add a textbox field
7) exit from 'Modify' mode and save
8) in 'Standards' panel I see that pdf doesn't conform.
9) I opened the preflight tool and see two errors
a) "XMP property for a page object not predefined and no extension schema present".
page reports the following Trigger values:
- Extension schema is present in XMP: is not true
- Property exists in PDF/A Standard: is not true
b) Form field does not have an appearance dictionary
page reports the following Trigger values:
- Form field has an appearance dictionary: is not true
I'm quite new to Acrobat: simply downloaded the Actobat XI evaluation version, created the file and added the text field. No special settings nor other configurations was applied,
I'm wondering if someone else was able to reproduce this behavior.
thank you for any commentFirst, about invalidating the PDF/A. I was told, but never had this confirmed nor tested, that editing a PDF/A will automatically cause the PDF/A status to be deleted from the file. This is because Acrobat does not know about the compatibility of every edit with every current (and future) PDF subset standard, so it is safest just to remove the indicator - if you turn off Adobe's PDF/A view mode which will prevent editing anyway.
Now, you have a problem with the signatures. Possibly a very big one. Your description "2) fill the text field with some annotations and then sign the signature field 3) save the pdf" is a little too separated. At the time a file is signed it is saved, the hash calculated, and written to the file. So signing and saving are just one action. Yet an unsigned digital signature needs, it seems to me, no appearance.
I think the solution is a simple one. Sign it, but not with a signature field. If it is PDF/A when you start it is probably PDF/A when you finish. Signature fields seem a distraction and obstacle to the important thing, signing. -
Import screen field value into search help assigned to a different field
Hi,
I have created an elementary search help based on a custom DDIC table ZSH_SHHLDR. Dialog Type: Dialog depends on set of values, search help parameters:
Parameter Import Export LPos SPos SDis
FOLIO X 1 1 X
CERTN X 2 2
where FOLIO and CERTN are fields in my table.
There are two fields in my program defined as like FOLIO and CERTN respectively. These fields are screen fields in a custom dynpro created using Screen Painter. The search help is assigned to the CERTN field. In the screen, I want that the contents of the FOLIO field should be imported into the search help, i.e. on the screen:
FOLIO: 21353
CERTN: <F4>
When I click on F4 help for CERTN, I want that the FOLIO parameter in the search help should contain the value for FOLIO that I entered in the text box on the screen. Is there a way to do this, through an exit for instance? Help is appreciated, thanks.
RegardsHi,
You need to use the below statement.
process on value-request.
field zcom_doa_users-zzjob_role module sub_tes_module.
Here I declared three fields in the screen fields from structure zcom_doa_users. Try to name the fields with table name-field name. So inside the module in structure zcom_doa_users you will get given value for the other fields also.
Now you can do your own processing for f4 help.
Thanks
Subhankar -
Screen exit MEREQ001- Copy 1 PR line item custom fields values in all
Hi,
I have implemented the Enhancement MEREQ001 to add a new tab for Purchase Requistion screen at line item level .
Requirement for me is to show the same data in the newly added tab for all line items and also to save the same data in EBAN table.
I am facing a problem while saving the data. In EBAN table, the data was saved for all line items. But the custom added field values are saved for only the line item displayed.
I ll explain with an example for better understanding.
I have created a PR with 3 line items ITEM1, ITEM2 ,and ITEM2
When i saved the data when ITEM1 is displayed, EBAN have custom added field values for ITEM1 but not for ITEM2 and item3.
The same way, if I save data when ITEM2 is displayed, EBAN has custom added field values for ITEM2 but not for ITEM3 and ITEM1.
Now, my requirement is to get the all line items ITEM1 & ITEM2 and ITEM3 updated with custom added field values in EBAN.
The logic i added in ME_PROCESS_REQ_CUST~CHECK are as below.
i_items TYPE mmpur_requisition_ite ,
lv_if_item TYPE REF TO if_purchase_requisition_item,
lt_itm_data TYPE mereq_item .
DATA : LV_dept TYPE EBAN-ZZDEPARTMENT ,
lx_itm_data type mereq_itemx.
CALL METHOD im_header->get_items
RECEIVING
re_items = i_items.
LOOP AT i_items INTO wa_item.
lv_if_item = wa_item-item.
CALL METHOD lv_if_item->get_data
RECEIVING
re_data = lt_itm_data.
CALL METHOD lv_if_item->get_datax
RECEIVING
re_datax = lx_itm_data.
IF lt_itm_data-zzdepartment IS INITIAL.
lt_itm_data-zzdepartment = LV_dept .
lx_itm_data-zzdepartment = 'X' .
ELSE.
Lv_dept = lt_itm_data-zzdepartment.
ENDIF.
To set the value for all line item.
CALL METHOD lv_if_item->SET_DATAX
EXPORTING
IM_DATAX = lx_itm_data.
CALL METHOD lv_if_item->Set_data
EXPORTING
IM_data = lt_itm_data.
ENDLOOP. " LOOP AT i_items INTO wa_item.
ENDIF. " IF ( NOT ls_header1-banfn IS INITIAL
BUT above logic is not working
Please give your inputs
Thanks in advance
Deepanker DwivediHI,
You can use GET CURSOR LINE LINE_NO this will give you the sy-index so that you can read the itab like
read table itab index line_no. This is one option and second is if you have row selector.
read table itab with key mark = 'X'.
If you want the Row contents befor the PAI triggers
[Check this Thread|Table Control dynamic F4;
Hope this is clear to you.
Regards
Ram -
Simple Transformation XML to ABAP Content of tag with subtrees to string field
Hi,
I have an requirement in which I have to do a transformation from an XML file to an structure.
I need get the value of a tag that have subtrees and move that to a field in my structure.
Example:
<TAG1>value1</TAG1>
<TAG2>value2</TAG2>
<TAG3>
<TAG4>value4</TAG4>
<TAG5>value5</TAG5>
</TAG3>
Result expected in ABAP Structure:
field1 -> tag1
field2 -> tag2
field3 -> <TAG4>value4</TAG4><TAG5>value5</TAG5>
The contents of the tag TAG3 is variable, so I want to store it as a string.
Can I make this with Simple Transformation?
In my tests I can move only the value of each child tag for the given field structure.
This syntax dont work:
<TAG3 tt:value-ref="STRUCTURE.FIELD3"/>
Thanks and Regards,
Miguel MottaHi Miguel
Have a look at below snippets. Here I have tried to escape the text inside TAG3 so that it gets treated as single node during transformation.
ABAP code
DATA: BEGIN OF result,
col1 TYPE string,
col2 TYPE string,
col3 TYPE string,
END OF result.
DATA: xml_string TYPE string VALUE
'<ROOT> <TAG1>value1</TAG1> <TAG2>value2</TAG2> <TAG3> <TAG4>value4</TAG4> <TAG5>value5</TAG5> </TAG3> </ROOT>',
part1 TYPE string,
part2 TYPE string,
part3 TYPE string.
* Escape the text inside TAG3 tag
FIND REGEX '(.*<TAG3>)(.*)(</TAG3>.*)' IN xml_string SUBMATCHES part1 part2 part3.
IF sy-subrc EQ 0.
part2 = escape( val = part2 format = cl_abap_format=>e_xml_text ).
* REPLACE ALL OCCURRENCES OF '<' IN part2 WITH '<'.
* REPLACE ALL OCCURRENCES OF '>' IN part2 WITH '>'.
xml_string = part1 && part2 && part3.
ENDIF.
TRY.
* Display xml
cl_abap_browser=>show_xml( EXPORTING xml_string = xml_string ).
* Deserialization
CALL TRANSFORMATION zmtest
SOURCE XML xml_string
RESULT para = result.
* Check result
WRITE:/ 'COL1=', result-col1,
/ 'COL2=', result-col2,
/ 'COL3=', result-col3.
CATCH cx_st_error.
* Error handling
MESSAGE 'Error in Simple Transformation'
TYPE 'I' DISPLAY LIKE 'E'.
ENDTRY.
Transformation code
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates" template="temp" version="0.1">
<tt:root name="PARA"/>
<tt:template name="temp">
<ROOT>
<TAG1>
<tt:value ref="PARA.COL1"/>
</TAG1>
<TAG2>
<tt:value ref="PARA.COL2"/>
</TAG2>
<TAG3>
<tt:value ref="PARA.COL3"/>
</TAG3>
</ROOT>
</tt:template>
</tt:transform> -
Simple Transformation - XML to Internal Table Error
I have a webservice call that returns XML. I need to transform a portion of the response to an internal table, but my simple transformation is not working with loop processing. I have read through most posts regarding the topic but they're either too old or related to serialization. There aren't any exceptions thrown, but I don't get any data in the internal table (PAPERWORK root). Below are some code snippets. Any ideas on the problem with the XSLT template? Thanks.
Sample XML:
<?xml version="1.0" encoding="utf-8" ?>
<PrintVersionDataSet>
<Result>
<ReturnCode>W</ReturnCode>
<ReturnMessage>There are reports with later version(s)</ReturnMessage>
</Result>
<Paperwork>
<ReportCode>CVR</ReportCode>
<ReportName>Cover Sheet</ReportName>
<Version>2</Version>
<PrintedDateTime>2009-05-01T09:54:04.1-05:00</PrintedDateTime>
</Paperwork>
<Paperwork>
<ReportCode>SPS</ReportCode>
<ReportName>Sponsor Summary</ReportName>
<Version>2</Version>
<PrintedDateTime>2009-05-01T09:54:04.99-05:00</PrintedDateTime>
</Paperwork>
</PrintVersionDataSet>
XSLT Code:
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="RESULT"/>
<tt:root name="PAPERWORK"/>
<tt:template>
<PrintVersionDataSet>
<Result tt:ref="RESULT">
<ReturnCode>
<tt:value ref="RETURNCODE"/>
</ReturnCode>
<ReturnMessage>
<tt:value ref="RETURNMESSAGE"/>
</ReturnMessage>
</Result>
<tt:deserialize>
<tt:loop ref=".PAPERWORK">
<Paperwork>
<ReportCode>
<tt:value ref="REPORTCODE"/>
</ReportCode>
<ReportName>
<tt:value ref="REPORTNAME"/>
</ReportName>
<Version>
<tt:value ref="VERSION"/>
</Version>
<PrintedDateTime>
<tt:value ref="PRINTEDDATETIME"/>
</PrintedDateTime>
</Paperwork>
</tt:loop>
</tt:deserialize>
</PrintVersionDataSet>
</tt:template>
</tt:transform>
ABAP Call to Transform Data:
TRY.
CALL TRANSFORMATION Z_GA_PAPERWORK_VERS_WEBSVC
SOURCE XML LS_RESPONSE-VERIFY_PRINT_VERSION_RESULT
RESULT RESULT = LS_RESULT
PAPERWORK = LT_PAPERWORK.
CATCH CX_ROOT INTO ROOT_EXCEPTION.
CALL METHOD ROOT_EXCEPTION->IF_MESSAGE~GET_TEXT
RECEIVING
RESULT = LV_MESSAGE.
ENDTRY.Upon further inspection and testing with a simple file and program, I can see that the XML structure isn't quite correct for the loop process. There needs to be a single <PAPERWORK> node, instead of one for each table line in the file. This should allow the loop to execute properly after a slight adjustment to the XSLT template.
Maybe you are looking for
-
I recently undated software all around, reloaded windows 8 and upgraded to windows 8.1. My iPod Nano (1.0.4) appears on my list of iTunes (11.1.3) devices. The summary tab for my iPod shows 928 manually managed songs (2 of 8 GBs still empty). Howev
-
Report Parametr form not appearing on the WEB
I have a report develped using developer6 which has a parameter form to accept some values from the user befor exicuting the repot. We want to web enable this report. We are using Oracle9iAS web server on Solaris. Everything compiled fine, but when r
-
Hi I'd appreciate it if anyone can help me with this. I have a basic menu that I created in AS2, this can be seen here: http://www.qwerty-design.co.uk/example2.html I have the menu working in AS3 but I just can't get the buttons to stay down like the
-
Can't Log Out, Shut Down, or Restart after 10.5.2 update
Since updating I've been unable to log out any user, though I can switch between users via fast user switching. Selecting Restart, Shut Down, or Log Out [User] makes any active windows become inactive, but does nothing else. (The same happens selecti
-
Lynx Dual Boot 8.1/Android
Anyone have any success with dual booting the Lynx? Lenovo has Android 4.1 on the K900 smart phone with an Atom Processor so the architecture should be there to have a boot image of 4.1. Any and all ideas greatly appreciated. Thanks in advance.