Long text in bapi
Hi
I am trying to save a long text for material. to do this, I have to fill a table of type bapi_mltx.
If I insert one line all works correctluy, but if I try to insert more than one line, other lines are ignored and I can see only the first seem to be read. This is my code.
it_mltx-langu = lang.
it_mltx-langu_iso = iso_lang.
" insert first line
it_mltx-text_line = line1.
it_mltx-format_col = '*'.
APPEND it_mltx.
" insert second line
it_mltx-text_line = line2.
it_mltx-format_col = '='.
APPEND it_mltx.
I follow a precedent hint adding the format_col field with '*' for first line and '=' for following, but it does not work. Can anybody help me please?
thanks
gabriele
Hi,
Use '*' for second line also, not '=' and see weather the second line coming or not.
it_mltx-langu = lang.
it_mltx-langu_iso = iso_lang.
" insert first line
it_mltx-text_line = line1.
it_mltx-format_col = '*'.
APPEND it_mltx.
" insert second line
it_mltx-text_line = line2.
it_mltx-format_col = '*'. " Change here to *
APPEND it_mltx.
Regards
Bala Krishna
Similar Messages
-
Dear All,
In notification updating I need to fill Activity long text through BAPI function module in that BAPI I have parameters like 1. Object type, 2. Object Key, 3. Format column and 4. Long text. If enter all fields also it will not get updated. can you give me suggestion
Thanks and regards,
Krish.....Currently i am using BAPI_ALM_NOTIFY_DATA_ADD
BAPI_ALM_NOTIFY_SAVE
BAPI_TRANSACTION_COMMIT.
It is adding a activity but long text is not getting updated. -
Update Time confirmation and Long text of Work Order in single FM or BAPI
Hi,
I would like to know, which standard FM or BAPI will update the longtext along with the confirmation text while doing the time confirmation of a work order.
I have tried with standard BAPI BAPI_ALM_CONF_CREATE for updating the time confirmation. This is updating the time and confirmation text properly but not the long text. I would like to know how can I update the long text while doing the time confirmation. Is there any other standard FM/BAPI will update both?
Thanks in Advance,
Mohan.There is no standard SAP enhancement we can use for this purpose.
We have developed another program to maintian the long text in production order.
This call can be closed.
Cheers,
Qiang -
Short coming in BAPI for saving Document Long Text
Hello Experts,
I would be thankful to you if anyone of you offer a solution to the problem below.
I have found that the tables parameter LONGTEXTS of function BAPI_DOCUMENT_CHANGE/CHANGE2/CREATE/CREATE2 (structure BAPI_DOC_TEXT) could include the field TDFORMAT so that the user can specify how the next line should be interpreted by the editor. This would be in accordance with the tables parameter LINES of function SAVE_TEXT which is used to save long text. Currently only the text line is catered for in the BAPI and the TDFORMAT is therefore defaulted to u2018*u2019 in the SAVE_TEXT function which causes each line in the table to be treated as a new line.
What if the user wanted the lines to be treated as continuous text?
With Best Regards,
Mientjie FerrieHi,
1. From se37, check for function group STXD
2. There will be many Fm.
3. The commonly used are
READ_TEXT
EDIT_TEXT
SAVE_TEXT
Regards -
Hi Experts,
i am using the BAPI : "BAPI_REQUISITION_CREATE". it' is working Fine.But i need to pass the Long Text Field of Header Note, Item Text, Item Note,Delivery text and Material P.O text through the BAPI.
Plz,Help me to Achieve this.
Thanks in Adv.
V.S.Naidu.Below is the code for BAPI_PR_CREATE just go through it and your dbout will be solved
it has example for multi line header text as well as line items...!
Hope it helps
CLEAR GV_BAPIMEREQHEADER.
MOVE 'NB' TO GV_BAPIMEREQHEADER-PR_TYPE.
move 'X' To GV_BAPIMEREQHEADER-AUTO_SOURCE.
CLEAR GV_BAPIMEREQHEADERX.
MOVE 'X' TO GV_BAPIMEREQHEADERX-PR_TYPE.
MOVE 'X' TO GV_BAPIMEREQHEADERX-auto_source.
CLEAR WA_BAPIMEREQITEMIMP.
MOVE :
'00010' TO WA_BAPIMEREQITEMIMP-PREQ_ITEM,
**'001' TO WA_BAPIMEREQITEMIMP-PUR_GROUP,
*'TWISTED PAIR CABLE' TO WA_BAPIMEREQITEMIMP-SHORT_TEXT,
'C-1030' TO WA_BAPIMEREQITEMIMP-MATERIAL,
'1000' TO WA_BAPIMEREQITEMIMP-PLANT,
'100' TO WA_BAPIMEREQITEMIMP-QUANTITY,
'20091001' TO WA_BAPIMEREQITEMIMP-DELIV_DATE.
APPEND WA_BAPIMEREQITEMIMP TO GT_BAPIMEREQITEMIMP.
CLEAR WA_BAPIMEREQITEMX.
MOVE :
'00010' TO WA_BAPIMEREQITEMX-PREQ_ITEM,
'X' TO WA_BAPIMEREQITEMX-PREQ_ITEMX,
*'X' TO WA_BAPIMEREQITEMX-PUR_GROUP,
'X' TO WA_BAPIMEREQITEMX-SHORT_TEXT,
'X' TO WA_BAPIMEREQITEMX-MATERIAL,
'X' TO WA_BAPIMEREQITEMX-PLANT,
'X' TO WA_BAPIMEREQITEMX-QUANTITY,
'X' TO WA_BAPIMEREQITEMX-DELIV_DATE,
'X' TO WA_BAPIMEREQITEMX-EXT_PROC_PROF.
*EXT_PROC_REF_DOC
*EXT_PROC_REF_ITEM
APPEND WA_BAPIMEREQITEMX TO GT_BAPIMEREQITEMX.
CLEAR EXTRA_FIELDS.
MOVE '00010' TO EXTRA_FIELDS-BNFPO.
MOVE '12345678901' TO EXTRA_FIELDS-ZZDANOSPR_NO.
MOVE 'MUM01' TO EXTRA_FIELDS-ZZPORT.
MOVE '20100505' TO EXTRA_FIELDS-ZZETD.
MOVE '20100506' TO EXTRA_FIELDS-ZZETA.
MOVE '123456789123456789' TO EXTRA_FIELDS-ZZEXTWG.
MOVE TEMP TO EXTRA_FIELDS-ZZrob.
CLEAR WA_EXTENSIONIN.
MOVE 'BAPI_TE_MEREQITEM' TO WA_EXTENSIONIN-STRUCTURE.
MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
CLEAR WA_EXTENSIONIN.
MOVE 'BAPI_TE_MEREQITEMX' TO WA_EXTENSIONIN-STRUCTURE.
MOVE EXTRA_FIELDS TO WA_EXTENSIONIN-VALUEPART1.
APPEND WA_EXTENSIONIN TO GT_EXTENSIONIN.
CLEAR WA_EXTENSIONOUT.
MOVE 'BAPI_TE_MEREQITEMX' TO WA_EXTENSIONOUT-STRUCTURE.
*MOVE EXTRA_FIELDS TO WA_EXTENSIONOUT-VALUEPART1.
APPEND WA_EXTENSIONOUT TO GT_EXTENSIONOUT.
clear wa_PRITEMTEXT.
MOVE '00010' TO wa_pritemtext-preq_item.
move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
MOVE 'THIS IS JUST FOR TEST' TO WA_PRITEMTEXT-TEXT_LINE.
APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
clear wa_PRITEMTEXT.
MOVE '00010' TO wa_pritemtext-preq_item.
move 'B01' TO WA_PRITEMTEXT-TEXT_ID.
MOVE 'THIS IS THE SECOND LINE' TO WA_PRITEMTEXT-TEXT_LINE.
APPEND WA_PRITEMTEXT TO GT_PRITEMTEXT.
BREAK-POINT.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
PRHEADER = GV_BAPIMEREQHEADER
PRHEADERX = GV_BAPIMEREQHEADERX
* TESTRUN =
IMPORTING
NUMBER = GV_NUMBER
PRHEADEREXP = GV_PRHEADEREXP
TABLES
RETURN = GT_BAPIRET2
PRITEM = GT_BAPIMEREQITEMIMP
PRITEMX = GT_BAPIMEREQITEMX
* PRITEMEXP =
* PRITEMSOURCE =
* PRACCOUNT =
* PRACCOUNTPROITSEGMENT =
* PRACCOUNTX =
* PRADDRDELIVERY =
PRITEMTEXT = GT_PRITEMTEXT
* PRHEADERTEXT =
EXTENSIONIN = GT_EXTENSIONIN
* EXTENSIONOUT = GT_EXTENSIONOUT
* PRVERSION =
* PRVERSIONX =
* ALLVERSIONS =
* PRCOMPONENTS =
* PRCOMPONENTSX =
* SERVICEOUTLINE =
* SERVICEOUTLINEX =
* SERVICELINES =
* SERVICELINESX =
* SERVICELIMIT =
* SERVICELIMITX =
* SERVICECONTRACTLIMITS =
* SERVICECONTRACTLIMITSX =
* SERVICEACCOUNT =
* SERVICEACCOUNTX =
* SERVICELONGTEXTS =
* SERIALNUMBER =
* SERIALNUMBERX =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
WRITE : 'THE PR CREATED IS : -',GV_NUMBER. -
Hi,
My queries as below. Hope anyone may know the answer.Thanks.
1) What are the maximun characters in BAPI Parameters can passed in? 265?
2) Could I do the upload 8000 of long text to SAP by passing the data via BAPI from external system?
Please advise the method.Hi,
My requirement is used the BAPI and perform upload of 8000 of long text to SAP.
These 8000 long text are sending from external system to BAPI as in below table format. It is possible?
Table in BAPI:
Vendor_No (Char 10)
Long text (Char 8000) -
Promotion creation via BAPI - long text issue
I am going to use BAPI_PROMO_CREATE to create a promotion. Unfortunately this BAPI does not handle the long text piece of the promotion, and that is a requirement. Does anyone know of a BAPI that will create the long text for a promotion, or is there a generic BAPI for this functionality? I couldn't find one.
Thanks,
TamiThis will resolve the issue
SAP Note 1452700 - "New" button is disabled after
displaying text
Note Language: English Version: 1 Validity: Valid Since 03/25/2010
Summary
Symptom
In display mode you navigate via the text hyperlink to the text view.
When you navigate back, the "New" button on the "Notes" assignment block is
disabled. -
I am trying to upload the purchase order long text in mm01 using BAPI
Hi All,
I am trying to upload Purchase Order Long text (which is in chinese Language) and Language field with ZH(chinese) in MM01 using BAPI_MATERIAL_SAVEDATA.
It is uploading properly, But in the Language field it is showing Z1(Customer reserve) instead of ZH(Chinese).
What could be the reason for this and how it can be resolved.
Thanks in advance,
RajaHi,
Which input parametr did you use? See table T002
LANGU = '1'
LAISO = 'ZH'
Rgds,
JP -
Error While uploading Long Text for Operations in IA05 Transaction.
Dear Team,
Good Day.
While we are trying to upload the Long Text through BDC for IA05 operations the text is updating in Database but it is not visible in the long Text field. Is it possible to upload the long text through BDC or any bapi's which can be used for the same. Any configuration needed for this please do the needful.
Regards,
Bhanu.Hi Bhanu
correct me if im wrong, the long text is a multiline text, its an object for text, this cant be filled with BDC since this object can not be created in background mode, so i think the bdc skip the routines to fill this object, you can use the save_text function right after the transaction ends
Regards
MC -
Error while uploading Long Text in IA05 through BDC.
Dear Team,
Good Day.
While we are trying to upload the Long Text through BDC for IA05 operations the text is updating in Database but it is not visible in the long Text field. Is it possible to upload the long text through BDC or any bapi's which can be used for the same. Any configuration needed for this please do the needful.
Regards,
Bhanu.Bhanu,
I've modified the previous message with a correction that, I had used this for uploading Activity lines Longtexts.
One more thing: After I faced some problem, I used split text in the code. i.e., Splitting the longtext into several lines (72 char each). Show these code lines to your ABAPer, may be he might be able to draw some clues.
In the BDC lines alongwith other fields the gold line below
PERFORM FILL_BDC_DATA USING ' ' ' ' ' ' 'BDC_OKCODE' '=MX07'.
PERFORM FILL_BDC_DATA USING ' ' ' ' ' ' 'BDC_CURSOR' 'QMICON-LTAKTION(07)'.
PERFORM FILL_BDC_DATA USING ' ' ' ' ' ' 'VIQMMA-MATXT(07)' FS_FIELD-MNTXT7.
PERFORM SPLIT_LONGTEXT USING COL_COUNT.
Code for Form SPLIT_LONGTEXT is attached herewith (MATXT1 to MATXT7 are longtext split into 7lines )
Best of luck
KJogeswaraRao -
Dear Guys
I am trying to print long text stores at line Item of ME 23n Text Editor, in Smart From.
I am calling a BAPI for reading Purchase requistion details. The itab is also showing complete paragraph of text. But when I write it on smart from, previw is not showing complete paragraph. Infact many space is still left in smart form column.Thnx Subramanian PL for replying.
When user writes text in ME23N text field, he normally use Enter Key many times to go to next line but while displaying it on a smart form using a loop the text also breaks unexpectedly due to those Enter Key press by user,while still there is more space to write the text in a sigle line on smart form.
To avoid above problem I first store all the text belong to a single papragraph in a variable string of smart from. But now when I try to display this text on smart from it is missing few last lines. Infact while debugging it, I can see that text is stored completely in variable.
Message was edited by:
Adnan Maqbool -
How to add the long text in Production order through FM
Hi,
Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in Background.
Now client wants to add the Long text (seperate TAB in production order and they want to update the VC details of Sales order in the Long text area).
One option is after creation of Production order, through BDC(calling CO02 and update the long text) we can update the long text and client doesn't want this option.
Another option is after creation of Production order, using Function module SAVE_TEXT, Update the Long text in Production Order and this is not working in Production order (already my ABAP consultant checked it ).
If any one of you came across this requirement, pl share with me how you addressed it.
Regards
A.SureshbabuHi,
The method is quite simple, i presume you're quite well versed with doing recording, so the key thing to keep in mind is how to prepare the input file.
At my end i had about 5 lines of data which needed to be uploaded, hence i had a tab-delimited file with the order nos. in the first column & the five lines of text in five different columns (Refer format below)
Order No.
Line - 1
Line - 2
Line - 3
Line - 4
Line - 5
12345
txt - 1
txt - 2
txt - 3
txt - 4
txt - 5
67890
txt - a
txt - b
txt - c
txt - d
txt - e
Now provide this input file for your lsmw or bdc program & it will work. You can work with your abaper if you're not so comfortable with LSMW or BDC programming he / she should be able to easily make it work for you.
Regards,
Vivek -
How to download and upload long text for project, WBS , Network,
Hi all,
I have two isssues.
1) I am extracting Projects, WBS , Network , Network activity and network activity element from a SAP 4.7 system using bapi's
BAPI_PROJECTDEF_GETDETAIL
BAPI_PROJECT_GETINFO
BAPI_NETWORK_GETINFO
BAPI_BUS2054_GETDATA
I am able to get all the details except long text. I want to know how do i extract the long text other than getting it manually by using select_text and Read_text Function module, is there any bapi to achieve this.
The reason why i am not using Function modules Read_text and Write_text is, object name( TDNAME ) value stored in STXH table for project, wbs and network are the project, wbs and network itself so i dont have any issues with this but the TDname value for activity and activity element are completely different ( Routing number and counter is stored respectively ) which i am not getting as the part of the bapi(BAPI_NETWORK_GETINFO) output.
2) I have to upload the extracted Project and it sub object data to ECC 6.0 system , i am able to achieve this by using BAPI's BAPI_PROJECTDET_CREATE, BAPI_PROJECT_MAINTAIN and BAPI_NETWORK_MAINTAIN. I am not able to load the longtext for the same, is there any way to load the long text .
All help will be greatly appreciated and rewarded.
Thanks & Regards,
Rajanidhi Rajasekeran.I don't think there is any BAPI to do it.
We are doing it by read_text & edit_text . required fields for text name can be fetched by following select
if not e_activity[] is initial.
select aaufnr aaufpl baplzl bobjnr b~vornr
into corresponding fields of table t_longtext
from afko
as a
left join afvc
as b
on aaufpl = baufpl
for all entries in e_activity
where a~aufnr = e_activity-network
and a~aufnr is not null.
endif.
txtname = wa_longtext-objnr.
replace c_nv in txtname with sy-mandt. -
Empty line in long text in order
Hi,
I'm using BAPI_SALESORDER_CREATEFROMDAT2 to create orders. Long texts can be added to the BAPI with the parameter ORDER_TEXT.
I know want to add different information. Therefore I need to insert an empty line between the different lines. How can I do that? If I add a line with just a space in the data element TD_LINE (text_line), it is not working. The BAPI might remove that while order creation.
Any advices?
Thank youhi,
Do not append this to the internal table. Instead concatenate twice from where you want the blank link.
Example
The table contains the three lines as shown below
This report is required as to submit to the Govt. Department as a Statutory Report.
Manually preparing this form is very difficult. After this development user can get form with minimal efforts as well accuracy regarding data will be more.
But we required to display/update as
This report is required as to submit to the Govt. Department as a Statutory Report.
Manually preparing this form is very difficult. After this development user can get form with minimal efforts as well accuracy regarding data will be more.
Just you need to cancatenate the cr_lf twice at the end of 1st line
This report is required as to submit to the Govt. Department as a Statutory Report.0D0A0D0A
while displaying the long text in the Order it will show the effect. -
Using long text in Mobile 7.1
Hello,
We are using Mobile 7.1. We want to display a long text of the notification object in the Mobile Client. We defined this field as STRING data type in the DOE and set TEXT MEMO flag for it. Unfortunately we have a problem with its definition in the backend. This field is included in the header structure for the noitification obect so when we define it as STRING (DSTRING data element), we get compilation error that STRINGS cannot be defined in the flat structure.
So how can we define this field in the backend in order to transfer more than 256 characters?
Thanks in advance,
SergeyHi,
You need to have a separate table to store attachments in the backend.
In the DOE define the attribute as STRING(tick the text memo) [This you have already done] .
In the backend you will need another table where you will be storing the attachments.
Lets assume you have a notification table : In this define the field for headertext with the data type as CHAR and length 1
Create another table where you want to store the attachments:
You can have the fields as NOTIFICATION and HEADERTEXT. This headertext should have a datatype STRING. You can also have a field called attachment type to store whether it is HeaderText or Binary Memo.
Create a BAPI wrapper for getting the HEADERTEXT with importing parameter as NOTIFICATION and exporting HeaderText and a return parameter:
Here the source code:
SELECT SINGLE b~headertext INTO e_headertext
FROM <notification table> AS a
INNER JOIN <attachment table> AS b ON
borderid = aorderid
WHERE a~orderid = orderid AND
a~headertext = 'X' and
b~ATTCHTYP = 'HEDTXT'.
Now in the DOE : give this function module name in the attachment Function module. SAVE (very important)
After doing the mapping go to the attachment tab and do the mapping with the attachment function module.
save and activate the backend adapter.
execute SDOE_LOAD.
Go to SE11: there should be a table starting <cds table name>ending with _TM.
Create an application in the similar way. No extra code required.
Thanks and Regards,
Narayani
Maybe you are looking for
-
Hi, Initially I have two mappings, the first insert new records in the target table. The second updates some fields of new records using expressions and the updated table is in the same time the source and target. In order to have only one mapping wh
-
Redeploying application errors out.
We have a clustered application servers (2), and have deployed the application using OEM Application Server Control. Sometimes, when we redeploy an application (EAR) we get the following error and the ASC removes the application from the OC4J contain
-
Does any one know if there is a music file size limit? I want to put music on my site like a radio station. I put together some tracks with voice overs in garage band.and exported to itunes. I don't want it to be podcast because this is a private sit
-
Does anyone know if the new iweb fixes the problem of limited blog entries? I have read many other people having this same problem with not being able to add a new entry unless an older one is deleted. Ours has been this way for a while. http://web.m
-
No package with component name in src/mimes
Hi, I want to put a gif image file in src/mimes/components/<component name>. I am giving reference of this image in my View's image UI element. However, when I navigated to 'src/mimes/components', I don't find any subfolder with name of my component.