From SAP to EXCEL (OLE), add new line in the same cell
Hi all !
All that I want to do is ... to write in the same cell different lines as i using "Alt + Enter" command.
Excel´s macro report like this printing "Hello World" on different lines of the same cell.:
+ActiveCell.FormulaR1C1 = "Hello" & Chr(10) & "World"+
+With ActiveCell.Characters(Start:=1, Length:=22).Font+
+.Name = "Arial"+
+.FontStyle = "Normal"+
+.Size = 10+
+.Strikethrough = False+
+.Superscript = False+
+.Subscript = False+
+.OutlineFont = False+
+.Shadow = False+
+.Underline = xlUnderlineStyleNone+
+.ColorIndex = xlAutomatic+
+End With+
+Range("B1").Select+
So my problem is how to translate this to ABAP code.
Thank you so much in advance!!
Never mind. I found my answer in another post:
EXISTING CUSTOMERS- That add lines post 7/7/2011, will NOT be able to choose the $29.99 unlimited data feature
Similar Messages
-
Add new line in the Flat file based on the field value
Hi,
Following is my Flat File -
Customer X Y
1001 1 2
1002 0 1
Based on the X and Y value I need to add new lines in the Flat file. If X>0 then add a new line with repeating row and Y>0 add again a new line with repeating row. If X or Y=0 then no need to add any repeating new line.
So, here for the above example I need output as-
Customer X Y
1001 1 2
1001 1 2
1001 1 2
1002 0 1
1002 0 1
Suggest how we can achieve this?
Regards,
Tridib KonwarHi Tridib,
I tried your scenario and You will have to use the custom xslt to get the expected result.
Please find bellow the xslt code which you can use in your map.
<?xml version="1.0" encoding="utf-16" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://PracticeAtul.XYFlatFileSchema">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/ns0:XYComp" />
</xsl:template>
<xsl:template match="/ns0:XYComp">
<ns0:XYComp>
<XYComp_Child1>
<XYComp_Child1_Child1>
<xsl:value-of select="XYComp_Child1/XYComp_Child1_Child1/text()" />
</XYComp_Child1_Child1>
<XYComp_Child1_Child2>
<xsl:value-of select="XYComp_Child1/XYComp_Child1_Child2/text()" />
</XYComp_Child1_Child2>
<XYComp_Child1_Child3>
<xsl:value-of select="XYComp_Child1/XYComp_Child1_Child3/text()" />
</XYComp_Child1_Child3>
<xsl:value-of select="XYComp_Child1/text()" />
</XYComp_Child1>
<xsl:for-each select="XYComp_Child2">
<XYComp_Child2>
<XYComp_Child2_Child1>
<xsl:value-of select="XYComp_Child2_Child1/text()" />
</XYComp_Child2_Child1>
<XYComp_Child2_Child2>
<xsl:value-of select="XYComp_Child2_Child2/text()" />
</XYComp_Child2_Child2>
<XYComp_Child2_Child3>
<xsl:value-of select="XYComp_Child2_Child3/text()" />
</XYComp_Child2_Child3>
</XYComp_Child2>
<xsl:if test="XYComp_Child2_Child2/text()!=0">
<XYComp_Child2>
<XYComp_Child2_Child1>
<xsl:value-of select="XYComp_Child2_Child1/text()" />
</XYComp_Child2_Child1>
<XYComp_Child2_Child2>
<xsl:value-of select="XYComp_Child2_Child2/text()" />
</XYComp_Child2_Child2>
<XYComp_Child2_Child3>
<xsl:value-of select="XYComp_Child2_Child3/text()" />
</XYComp_Child2_Child3>
</XYComp_Child2>
</xsl:if>
<xsl:if test="XYComp_Child2_Child3/text()!=0">
<XYComp_Child2>
<XYComp_Child2_Child1>
<xsl:value-of select="XYComp_Child2_Child1/text()" />
</XYComp_Child2_Child1>
<XYComp_Child2_Child2>
<xsl:value-of select="XYComp_Child2_Child2/text()" />
</XYComp_Child2_Child2>
<XYComp_Child2_Child3>
<xsl:value-of select="XYComp_Child2_Child3/text()" />
</XYComp_Child2_Child3>
</XYComp_Child2>
</xsl:if>
</xsl:for-each>
</ns0:XYComp>
</xsl:template>
</xsl:stylesheet>
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.
Atul Toke -
Can anyone give me the code for adding the new row in the same page itself.If we click on add button a new row should come in the table.
Thanks in advanceHi,
invoke a method in AM on button click
public void addrows()
AddressesVOImpl vo1 = getAAddressesVO1();
AddressesVORowImpl row1 = (AddressesVORowImpl)vo1.createRow();
vo1.insertRowAtRangeIndex(0,row1);
vo1.setCurrentRow(row1);
Thanks,
Gaurav -
How do I add new data to the same file in a State Machine?
Hello,
I have a State Machine, with a State where 3 samples of data are collected in a For Loop. I would like to save this data in a file and keep adding new data to the same file each time I get to this state. The problem I'm running into is that each time I reach this State, my old data in the Excel file gets replaced with the new data instead of being continuously added in the same file.
Ive tried Shift Registers but I may not be using them correctly since my file keeps displaying only 3 new data points.
Any ideas will be appreciated!
Thank you, so much.
-PeterWhere should I place these shift registers? Where should I place my File I/O VIs? Is it possible to use the Write to Spreadsheet File VI in this situation?
Ive attached a very simple example of the problem. Thank you.
Attachments:
StandardStateMachine 2.vi 16 KB -
How to add new line to the file?
Hello,
I will like to print 2 line of string in the following format to the
file:- file.txt
String1
String2
How to print a new line after String1 so that String2 can be written after String1?
- Eugene -Do you mean...
PrintWriter pw=new PrintWriter(new FileOutputStream("file"));
pw.println(string1);
pw.println(string2);
pw.close();
the println puts a new line after string1. -
BAPI_SALESORDER_CHANGE add new line and conditions with a condition value
Hi,
I am using BAPI_SALESORDER_CHANGE to add new lines to a credit memo. All works fine except that I can not seem to put a condition value on the new lines. The condition is created but with a value of 0. I can popluate the condition amount field, KBETR but not KWERT. BAPICONDX seems to only have the COND_VALUE field in it and not CONDVALUE as in BAPICOND. Does anyone have any idea how to do this? In the code below I just want to change the material on the first line of the credit memo and not add the condition. Then add new lines with the the condition.
lw_order_header_inx-updateflag = 'U'.
LOOP AT i_accru INTO wa_accru.
lv_count = lv_count + 1.
lv_posnr = lv_count * 10.
* Order Items
lw_order_item_inx-itm_number = lv_posnr.
lw_order_item_inx-material = 'X'.
IF lv_count = 1.
lw_order_item_inx-updateflag = 'U'.
ELSE.
lw_order_item_inx-updateflag = 'I'.
ENDIF.
APPEND lw_order_item_inx TO lt_order_item_inx.
lw_order_item_in-itm_number = lv_posnr.
lw_order_item_in-material = wa_accru-vakey.
APPEND lw_order_item_in TO lt_order_item_in.
* Conditions
IF lv_count <> 1.
lw_conditions_inx-itm_number = lv_posnr.
lw_conditions_inx-cond_st_no = '905'.
lw_conditions_inx-cond_count = '01'.
lw_conditions_inx-cond_type = 'ZHIE'.
lw_conditions_inx-currency = 'X'.
lw_conditions_inx-updateflag = 'I'.
APPEND lw_conditions_inx TO lt_conditions_inx.
lw_conditions_in-itm_number = lv_posnr.
lw_conditions_in-cond_st_no = '905' .
lw_conditions_in-cond_count = '01'.
lw_conditions_in-cond_type = 'ZHIE'.
lw_conditions_in-condvalue = wa_accru-accru.
lw_conditions_in-currency = 'GBP'.
APPEND lw_conditions_in TO lt_conditions_in.
ENDIF.
ENDLOOP.
* Change the credit memo
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = lv_vbeln
order_header_in = lw_order_header_in
order_header_inx = lw_order_header_inx
* SIMULATION =
* BEHAVE_WHEN_ERROR = ' '
* INT_NUMBER_ASSIGNMENT = ' '
* LOGIC_SWITCH =
* NO_STATUS_BUF_INIT = ' '
TABLES
return = lt_return
order_item_in = lt_order_item_in
order_item_inx = lt_order_item_inx
* PARTNERS =
* PARTNERCHANGES =
* PARTNERADDRESSES =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* SCHEDULE_LINES =
* SCHEDULE_LINESX =
* ORDER_TEXT =
* ORDER_KEYS =
conditions_in = lt_conditions_in
conditions_inx = lt_conditions_inx
* EXTENSIONIN =
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.Hi Rob,
Have you managed to solve this issue. If so, could you please share the solution.
I am also facing similar problem.
Thanks for your help.
Anoop -
How can I start a new paragraph within the same table cell?
In Numbers, when adding text within a table frame, how can I start a new line within the same frame (rather than advancing to the next cell)? I'd like to enter a mini-list of several items of various lengths of data.
While Wayne's answer solves your problem, another possibility is to uncheck the box at the bottom of the Table inspector for "Return key moves to next cell." If that is unchecked, the return key types a paragraph return within the cell (the same as Option Return with the box checked).
With that box unchecked, Shift Return types a soft return (new line without a paragraph break). -
Print data in two line in the same column
Hi,
In a tabular Report I want to print a column (eg:Description,) in two lines in the same cell.
Since the description is too long. Is it possible in report 6i. Or any other solution for this?
Please reply.Hello,
For the Description field set the Vertical Elasticity to EXPAND. Then it will adjust automatically based on data.
-Ammad -
Add new line item in VA02 by copying same Order line details
Hi All,
I've a requirement where i need to add new line items in the Sales Order (T Code VA02) with reference to the same Order lines . For e.g an Order 80000100 which has 2 line items and the requirement is to create a new line i.e. line item 0030 by copying the details from the existing line item 0010 of the same order .
I've checked the BAPI - BAPI_SALESDOCUMENT_COPY which is for Order Creation T Code VA01 . I'm looking out for Sales Order Change BAPI where i can give the reference as Order no and Order line item which will create a new line item in the same Order with the same details of the reference Order line item .
Do let me know your thoughts !!!!
Thanks,
BintuHi -
Please check these two FM's BAPI_SALESORDER_GETDETAILBOS & BAPI_SALESORDER_CHANGE.
Regards,
Atul Mohanty -
From sap to excel file with different sheets?
can i upload an internal table from SAP to single Excel file with different sheets for example like : sheet1, sheet2, sheet3.......sheet10. , but need to upload data from sap to excel worksheets ie. from multiple named tabs in Excel. Is this possible, and if so, please can you help and advise me how?
thanks
venkat.
Edited by: Matt on Feb 16, 2009 2:15 PM Removed excessive question marks...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Hi venkat,
Yes indeed it is possible to write data from internal table to different excel sheets. Check out SAP's Microsoft OLE functionality.Search on SDN for OLE . Following are some links
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sample%252bprogram%252bto%252bopen%252bexcel%252bsheet%252busing%252bole
You can also check out FM ALSM_EXCEL_TO_INTERNAL_TABLE to check how to read different worksheets.
Using the above two resources you can create a program that can upload data to multiple worksheets in the same workbook.
Also see this link
Creating Excel with More than one page
Edited by: aditya aghor on Feb 16, 2009 1:57 PM
Edited by: aditya aghor on Feb 16, 2009 2:02 PM -
hi
I want to add a new line in va01 when a condition is requested. So for example i put 3 line and when a condition is ok i want to create so insert in vbap a new line in the order. I try with the badi BADI_SD_SALES_ITEM and ITEM_PREPARE but it's not work . Any idea ??
thankshI,
The badi BADI_SD_SALES_ITEM is the purpose of SAP Internal use (Check the Checkbox in Attributes Tab)so u can't implement the BADI.
try to keep the code even in USEREXIT_SAVE_DOCUMENT/USEREXIT_CHECK_VBAP in MV45AFZB.check the theard
Re: add a new tab in transaction ME51N
Regards
Kiran Sure
Edited by: Kiran Sure(skk) on May 20, 2008 5:19 PM -
How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2
Hi,
I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A
using BAPI_SALESORDER_CREATEFROMDAT2.
Line item no for new line item should be generated by SAP internally.Please let me know the mandatory parameters to be passed to the BAPI to fulfill the requirement.
DATA: order_header TYPE bapisdhd1,
order_inx TYPE bapisdhd1x,
partners TYPE TABLE OF bapiparnr,
wa_partners TYPE bapiparnr.
CLEAR: salesdocument,order_header_inx,wa_in, wa_inx.
REFRESH: item_in, item_inx.
salesdocument = wa_vbup-vbeln.
order_header_inx-updateflag = 'X'.
wa_in-itm_number = ' '.
wa_in-material = p_nmatnr.
wa_in-target_qty = gv_menge - gv_wemng.
APPEND wa_in TO item_in.
wa_inx-itm_number = ' '.
wa_inx-updateflag = 'U'.
wa_inx-target_qty = 'X'.
APPEND wa_inx TO item_inx.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
salesdocumentin = salesdocument
order_header_in = order_header
order_header_inx = order_inx
IMPORTING
salesdocument = salesdocument
TABLES
return = return
order_items_in = item_in
order_items_inx = item_inx
order_partners = partners.
Thanks
BhuvanaHello,
You can use FM: BAPI_SALESORDER_CHANGE with update indicator I (insert)
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = l_vbeln
order_header_inx = l_wa_order_header_inx
simulation = l_simulation
tables
return = l_i_return
order_item_in = l_i_order_item
order_item_inx = l_i_order_item_inx
partners = l_i_partners
schedule_lines = l_i_schedule_lines
schedule_linesx = l_i_schedule_linesx
extensionin = l_i_extensionin.
Thanks
Subhankar -
Cannot Add new line using BI IP query
Hi All,
We have created a planning application (BI IP Query) and used it in VC 7.1 model using BI Query Wizard service. Now we are able to customize existing rows ( existing rows are using flat file upload)... we can able to change the existing record values and save it.
But we are not able to add new line... its going to dump... We are able to add new line using WAD with same query but not in VC 7.1
This issue is same as below 2 threads...
Re: How to create new records through a VC form in an input-ready query??
Re: Cannot add new records through VC form when consuming IP write back query?
Thanks,
PradeePIts working now... SAP has given the fix (patch) for this issue when we deployed it, everything is working fine... I think they will release this fix (patch)soon...
Raise an Sap OSS message for solution -
Hi,
I have idoc to file scenarion. The first record is coming from script. The other data is coming from idoc. After signature have sholud be a new blank line. But the second row is coming near to signature. As follows:
<SIGNATURE=GNDPLU.GDF><VERSION=0222000> 01 1000000000000000078 000000000000000078
02 1000000000000000078 8694016000011 1 1
02 1000000000000000078 8697312999973 1 1
02 1000000000000000078 2050000004001 1 1
After signature should be a new line. The correct format should be as follows:
SIGNATURE=GNDPLU.GDF><VERSION=0222000>
01 1000000000000000078 000000000000000078
02 1000000000000000078 8694016000011 1 1
02 1000000000000000078 8697312999973 1 1
02 1000000000000000078 2050000004001 1 1
what should be added in receive file content conversion for this?
thanks for your help
NurhanHi Nuhran,
Why don't you add a newline parameter in your script only??
regards
Ramesh -
Please help to add new line at Header layout FBL3N
Dear Expert,
I need a requirement to custom the program from tcode FBL3N. So i copied the program become my custom program.
At the custom program, I need to add a new line for display total balance GL account for the previous month at header layout, under text company code.
For the Information, FBL3N used ALV List to display layout.
Is it possible to add new line??
If it's possible, how is the way to add that new line to display the total GL account?
I really appreciate your suggestion and solution.
Thank you,Thanks for all your help. My problem was that I was using 2 lists to update the table. The problem solve!!!!
int modelIndex = listWhenScrollStop.size () - 1 - aRow;
if (modelIndex >= 0) {
return listWhenScrollStop.get (listWhenScrollStop.size () - 1 - aRow);
Maybe you are looking for
-
Warning: Leaving out empty argument '-windowtitle'
When I generated a javaDoc for my project I received the following Warning: Leaving out empty argument '-windowtitle' Could someone please explain to me what is that warning and how to fix it? Thanks in advance
-
Photo info on thumbnails in new photo ap????
Previously the photos shown in ann Event or Album the image number shown automatically, and you could add or rename that image. With the new update those items are not showing. Has that feature been removed? I looked thru the drop down options in
-
Question about JRE and Swing applications
Hi i trying to make a Swing application whit some clients but one of them tell me that he have a lot of troubles whit java, because someone make an applet for his website and when he upgrade the JRE the applet dont work anymore. In my case i dont wan
-
OSB XSLT trasformations with XML input parameter
Hello , In my proxy service i need to make assign step with XSLT transformation which have input parameter thats have to be XML. As "Input Document" I select the body - $body/db:OutputParameters. In Bind Variables I have v_accinfo where i want to put
-
Can't download 9i DB using Lynx 2.8.5 with Redhat
When I attempt to download this it directs me to the License Agreement page where I select the necessary checkmarks. Then it lets me hit submit at the bottom of the page but acts as though I'm hitting 'I do not agree' and takes me to a page that says