How to retrieve the basic data text in material master to SAPSCRIPT?
Besides using the function module READ_TEXT in the calling program, what alternatives are there if I don't want to modify the program but make changes in the sapscript only?
I've tried to use the include statement in the sapscript editor, but I don't know how to call the text object whose ID is GRUN, object is MATERIAL.
Should I use the include statement or any other ways to do it?
Thanks.
Thanks for replying this message.
But the problem is that the object is not found,
as I tried to print &SAPSCRIPT-SUBRC& and 4 is resulted.
I've tried:
/:INCLUDE &MARA-MATNR& OBJECT MATERIAL ID GRUN LANGUAGE &SY-LANGU&
and
/:INCLUDE &ISEG-MATNR& OBJECT MATERIAL ID GRUN LANGUAGE &SY-LANGU&
But nothing is displayed. Anything wrong?
Similar Messages
-
How to Update the Basic Data text in Material Master.
Hi Abapers,
I have more than 5000 materials for update basic Data text inside Material Master.
how to update basic data text using abap programe? is there any bapi or normal program?.
anybody give me sample of this.
Thanks
S.Muthu.
IT Dept.Hi
You can do by using the FM SAVE_TEXT.
Just populate text into table i_tline.
Local data declaration
DATA: l_wa_thead TYPE thead, " Header
l_wa_tline TYPE tline. " Work area for tline
Populate header
l_wa_thead-tdobject = c_obj_material.
l_wa_thead-tdname = wa_data-matnr.
l_wa_thead-tdid = c_id_best.
l_wa_thead-tdspras = sy-langu.
l_wa_thead-tdluser = sy-uname.
l_wa_thead-tdfdate = sy-datum.
l_wa_thead-tdtxtlines = '1'.
IF i_tline[] IS NOT INITIAL.
l_wa_tline-tdformat = c_slash.
APPEND l_wa_tline TO i_tline.
ENDIF.
Text shd start from next line
l_wa_tline-tdformat = c_slash.
CONCATENATE c_text wa_data-text
INTO l_wa_tline-tdline SEPARATED BY space.
Append the new text to the int table
APPEND l_wa_tline TO i_tline and l_wa_thead
C* Local data declaration
DATA: l_wa_thead TYPE thead, " Header
l_wa_tline TYPE tline. " Work area for tline
Populate header
l_wa_thead-tdobject = c_obj_material.
l_wa_thead-tdname = wa_data-matnr.
l_wa_thead-tdid = c_id_best.
l_wa_thead-tdspras = sy-langu.
l_wa_thead-tdluser = sy-uname.
l_wa_thead-tdfdate = sy-datum.
l_wa_thead-tdtxtlines = '1'.
IF i_tline[] IS NOT INITIAL.
l_wa_tline-tdformat = c_slash.
APPEND l_wa_tline TO i_tline.
ENDIF.
Text shd start from next line
l_wa_tline-tdformat = c_slash.
CONCATENATE c_text wa_data-text
INTO l_wa_tline-tdline SEPARATED BY space.
Append the new text to the int table
APPEND l_wa_tline TO i_tline.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_wa_thead
savemode_direct = c_check
TABLES
lines = i_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc = 0.
COMMIT WORK.
endif. -
How to add basic data text into material master?
Hi anybody,
I want update only basic data text into material master. how to update basic data text ?
is it any bapi or functional module is there in abap?
anybody please tell me.
tks
s.muthuHi Subramanyan,
Check this function module:
CREATE_TEXT
Check out this sample program:
REPORT ZMM_INSERT_LONGTEXT.*Internal table to hold long text...
DATA:
BEGIN OF T_UPLOAD OCCURS 0,
MATNR LIKE MARA-MATNR, " Material number
ID(2) TYPE C, " Identification
LTEXT LIKE TLINE-TDLINE, " Long text
END OF T_UPLOAD,*Internal table to hold long text....
T_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.DATA:
W_GRUN LIKE THEAD-TDID , " To hold id
W_OBJECT LIKE THEAD-TDOBJECT VALUE 'MATERIAL',
" To hold object id
LV_VALUE(70). " Value to hold material number
START-OF-SELECTION.* This perform is used to upload the file
PERFORM UPLOAD_FILE.* This perform is used to place the text in MM02 transaction
PERFORM PLACE_LONGTEXT.
*& Form create_text
This routine used to create text in MM02 transaction
Passed the parameter w_grun to P_C_GRUN
and lv_value to P_LV_VALUE
FORM CREATE_TEXT USING P_C_GRUN
P_LV_VALUE. DATA:
L_ID LIKE THEAD-TDID,
L_NAME(70). MOVE : P_C_GRUN TO L_ID,
P_LV_VALUE TO L_NAME. CALL FUNCTION 'CREATE_TEXT'
EXPORTING
FID = L_ID
FLANGUAGE = SY-LANGU
FNAME = L_NAME
FOBJECT = W_OBJECT
SAVE_DIRECT = 'X'
FFORMAT = '*'
TABLES
FLINES = T_LINE
EXCEPTIONS
NO_INIT = 1
NO_SAVE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
CLEAR LV_VALUE.
ELSE.
DELETE T_LINE INDEX 1.
ENDIF.ENDFORM. " create_text&----
*& Form upload_file
This routine is used to upload file
No interface parameters are passed
FORM UPLOAD_FILE . CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
FILETYPE = 'DAT'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
DATA_TAB = T_UPLOAD
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. SORT T_UPLOAD BY MATNR ID.
ENDFORM. " upload_file
*& Form place_longtext
This routine places the text in MM02 transaction
No interface parameters are passed
FORM PLACE_LONGTEXT . LOOP AT T_UPLOAD. T_LINE-TDFORMAT = 'ST'.
T_LINE-TDLINE = T_UPLOAD-LTEXT.
APPEND T_LINE. IF T_UPLOAD-ID EQ 'BT'.
MOVE T_UPLOAD-MATNR TO LV_VALUE.
MOVE 'GRUN' TO W_GRUN. "Test ID for Basic data text
PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
ENDIF. IF T_UPLOAD-ID EQ 'IT'.
CLEAR W_GRUN.
MOVE T_UPLOAD-MATNR TO LV_VALUE.
MOVE 'PRUE' TO W_GRUN. "Test ID for Inspection text
PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
ENDIF. IF T_UPLOAD-ID EQ 'IC'.
CLEAR W_GRUN.
MOVE : T_UPLOAD-MATNR TO LV_VALUE,
'IVER' TO W_GRUN.
"Test ID for Internal comment
PERFORM CREATE_TEXT USING W_GRUN LV_VALUE.
ENDIF.
ENDLOOP.ENDFORM. " place_longtext
Hope this helps you.
Regards,
Chandra Sekhar -
Which table do "Basic data text" of material master record in?
Hi All:
There is tab with name of "Basic Data text" in additional data of material master, my question is which table record this information?
BR
KevinHi Kevin,
Please check this:
Read the long text of material master
Regards,
Csaba -
How to retrieve the Line item Text
Hello,
I need to retrieve the Line item Text in the PO (Material PO text). Can anyone provide me a sample code? i need to display this in a smartform.
I could not retrive it from the Function Module READ_TEXT.
Can any one help me regarding this?
Regards,
kvsskirankumarHI,
Use function module READ_TEXT to fetch PO line item text by passing id, language, name and object.
For Ex:-
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = 'F01'
language = 'E'
name = << concatenate PO number & line item>>
object = EKKO
tables
lines = g_t_ltext.
Thanks & Regards
Sudheer Madisetty -
Uploading Basic Data Longtext into Material Master
Hi Experts,
While creating material master i need to upload Basic Data Long text into material master.
For this iam using a BDC.How we can get this long text into sap systen and how we will update in material master.Hi,
you can use the below function module instead of Save_text..
BAPI_MATERIAL_SAVEDATA.
in the above function module
headdata-material = matnr.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = headdata "contains materail number
IMPORTING
return = return
TABLES
MATERIALLONGTEXT = t_longtext "pass long text here
returnmessages = returnmessages.
Prabhudas -
How to retrieve the creation date of clients ?
Dear all,
I have few DEV clients which are copied from Production clients. When want to perform client deletion I want to delete the oldest client in DEV. But which is the oldest client ?
Is there a table or tcode that can show me when are those DEV clients created ?
What I am doing now is very time consuming, i have to login to production, execute SCC3 and find out when is the client exported and what is the TR number. Then in DEV i execute SCC3 to find out which DEV is created with what TR number.
By doing this i will know
a.) The DEV client is a copy of PRD as per which date.
b.) and when is the DEV client created.
In SCC4, it has the information of when is the client changed, but not when it is created.
In SE16, table T000 refers to same info in SCC4 as well.
Your advice and input are highly appreciated.
Thanks.
Regards,
KentHi Juan,
Follow your steps, I got below output, but no "Data record created".
Parameters for Analysis:
System ID: PRD
SAP Release: 700
Client: 199
Date : 28.05.2009
Time: 20:29:01
User: KENT
Selected Period
From (date/time) 22.05.2005 00:00:00
To (date/time) 28.05.2009 20:28:18
Selected Customizing Objects:
T000 S Clients
Analysis without archived log data
No logs found for the selected period
Then I clicked on "Logging: Display status" it says "Logging is switched off".
Questions
a.) This will only work when the logging is turn on, right ?
b.) Assuming the logging is turn on and i manage to get the creation info, at table level how do i retrieve the same info ? Because if I have 10 clients, i hope to see all the info and dates at one glance.
Please advise.
Thanks.
Regards,
Kent -
Hi!
I recently intalled a clean Mac OS X Lion on my system, I was having Snow Leopard (10.6.8) before. So before the format of the hard drive I have taken the full backup of the system by Time Machine.
Now, after the fresh installation of Lion, I want to retrieve the data of diffrent previously installed applications like iPhoto, Address Book or iCal and so.. but certainly I want to retrieve the data only, not the full application (since they are the older versions of the application). How I can have the data of these applications into the new OS X Lion's blank Applications..!?
Please give some solution.
Thank you very much.Lion hides your home library
there are 3rd party programs to help. having a CLONE of your old system often trumps what TM alone offers.
And it makes sense to start a new TM backup set on another drive and keep the old one intact.
Lion Community and TM section might be worth a visit.
http://www.apple.com/support/timemachine
There are also some tech articles on Lion's Migration Assistant -
How to retrieve the 'Where Clause' text?
Hello all,
I have created a package to retrieve all the DML's executed against the database for the day, for a particular user. DBMS_LOGMNR package was used to retrieve DMLs. But the DMLs retrieved have their 'WHERE' clause text converted to ROWID's. I need to find out the 'WHERE' clause with the parameters.
I tried retrieving values from the v$sql views, but that information is cryptic and very volatile.
Is there a way to retrieve the 'Where' clause? If not, is there a way to retrieve the 'WHERE' clause information using a trigger against the corresponding table.
I am desparately lookin'for a solution. Hope someone out there can help me out.
Regards,
Prabu Raghav.Hi Andrew,
Thanks for the suggestion.
I am using Oracle 8i not 9i.FGA using DBMS_RLS let's me add policies and retrieve all other information about a user except the SQL statement that's executed by the user.
I want to retrieve the Current sql statement executed against the table by a particular user and record it.
Any suggestions?
Regards,
Prabu Raghav. -
How to get the Delivery date in PO line Item in SAPScript
Hi Gurus,
I am working on PO Script (MEDRUCK). I copied the Standard to a Z form. ZMM_MEDRUCK, Now I need to print the the Header text at the end of MAIN window. I put Iem number along with the other line Item informmation like stanadrd PO Script MEDRUCK. I also want to show the delivey date with line Item, so Itried to use EKET-EINDT but it is returning the delivery date of last line item, means while printing the first line and other information it is showing the delivery date of the last line item, I tried with the PEKPO-EINDT it is also not working.
Can any body suggest me how i can get the delivery date for the respective line Item ?
Regards
Sonyactually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
For Example u can use this code.
To print you have write the this code in Script item level printing window "MAIN" window
Following perform is called to get the line item delivery date in PO
{/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
/: USING &EKPO-EBELN&
/: USING &EKPO-EBELP&
/: CHANGING &DEL_DATE&
/: ENDPERFORM}
{* Dellivery date &DEL_DATE& }
write the below code in the Z program "ZPerform_prog"
{ FORM get_del_date TABLES in_par STRUCTURE itcsy
out_par STRUCTURE itcsy.
READ TABLE in_par WITH KEY 'EKPO-EBELN'.
CHECK sy-subrc = 0.
$_po_no = in_par-value.
READ TABLE in_par WITH KEY 'EKPO-EBELP'.
CHECK sy-subrc = 0.
$_po_line = in_par-value.
SELECT *
FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
$_del_date = eket-eindt.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = eket-eindt
IMPORTING
date_external = $_del_date
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
READ TABLE out_par WITH KEY 'DEL_DATE'.
CHECK sy-subrc EQ 0.
out_par-value = $_del_date.
MODIFY out_par
INDEX sy-tabix.
CLEAR : $_po_no , $_po_line ,$_del_date.
ENDSELECT.
ENDFORM. "GET_DEL_DATE } -
IDOC : How to send the basic view of a Material
Hi experts,
I'm using BD10 to send Material data with ALE/IDOC.
I want to send Material Master Data (MATMAS), Modifications (ECMMAS) and the BOM (BOMMAT).
How can I send only the basic view of the Material Master Data ? By using another message type ?
Regards,
DavidSolution : new Message Type (By reducing MATMAS)
-
Old material number - Field in Basic Data 1 View Material Master
Hai Techies,
We have a field called old material number - MARA-BISMT in material master basic data 1 view. Is that field is just for reference of old material or does it have any effects in the SAP MM when using the material for purchasing or in BOM or so on.
Could any one please highlight me the consequences of using this field to refer a old material number for the new number created.
Thanking you in advance.
Regards,
Kris.SHello Kris,
Number under which you have managed the material so far or still manage it,
for example, in another system or in a card index.
You can use the old material number to systematically search for material
master records via matchcodes.
Your understanding for the use of this field is correct.
regards
Ray -
How to remove the serial no profile in material master
Hi experts
While changing the SerialNoProfile in Material master i am getting the following error message: Serial numbers already assigned to this material Please tell me the procedure how to remove the serial number profile for the material.hi
it is not possible to change the serial number profile once the serial numbers are existed for material .you can however create a separate serial no profile without serialization procedure and assign the same to the material
Also refer [serial number|http://help.sap.com/saphelp_erp60_sp/helpdata/en/3c/abc17e413911d1893d0000e8323c4f/content.htm]
regards
thyagarajan -
How to retrieve the large data from the database
in my program, I want to operate the data retrieved from the database. but there are too many rows in the ResultSet . so when I try to get the ReusltSet from the database, the error of "java.lang.OutOfMemoryError
" will appear . because there are two million rows contained in the ResultSet, So I want to know whether there are some methods to deal with this problem.
anyone can give me some tips or recommend some papers and books to me.
thanks!!!!the program is developed for the data warehourse, you know there is a large number of data in data warehourse. so I think I have to deal with the very large ResultSet in my program, this code is a example for my problem :
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Untitled1 {
String user = "";
String password = "";
public void createTable() {
try {
Class.forName("com.sybase.jdbc3.jdbc.SybDriver");
System.out.println("Good to go");
String url = "jdbc:sybase:Tds:59.64.137.240:5000/TJ";
Connection conn = DriverManager.getConnection(url, user, password);
System.out.println("connect successfully!");
// Statement st1 = conn.createStatement();
String sqlsentence2 = "SELECT DISTINCT caller FROM upcdr";
PreparedStatement st2 = conn.prepareStatement(sqlsentence2);
PreparedStatement st3 = conn.prepareStatement("INSERT INTO callerTable VALUES(?)");
System.out.println("createstatement successfully!");
// String sqlsentence1 = "CREATE TABLE callerTable (caller CHAR(18))";
// st1.executeUpdate(sqlsentence1);
// System.out.println(sqlsentence1);
// st1.close();
ResultSet rs = st2.executeQuery();
while (rs.next()) {
st3.setString(1, rs.getString("caller"));
st3.executeUpdate();
System.out.println(rs.getString("caller"));
st2.close();
st3.close();
} catch (SQLException e) {
e.printStackTrace();
System.out.println(e.getMessage());
System.out.println( e.getSQLState());
System.out.println( e.getErrorCode());
} catch (ClassNotFoundException e) {
e.printStackTrace();
public static void main(String args[]) {
Untitled1 cct = new Untitled1();
cct.createTable();
}at here, the table "upcdr" is very large, it has two million rows. when I run this program , the error will happen. someone told me that if I use the cursor, because it will retrieve one row from the database every time, so it will not produce a very large ResultSet, then the memory would not be used out. but I am not familiar with that aspect. so I think if anyone can give me some advice.
thanks!!!! -
How to retrieve the xml data into datagrid in vb6.0 using dom method
<?xml version="1.0" standalone="yes"?>
<Student_Details>
<Student>
<Name>sandeep</Name>
<Age>12</Age>
<Mobile>123456789</Mobile>
</Student>
<Student>
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student>
<Name>Sandeep Pr</Name>
<Age>12</Age>
<Mobile>9865231870</Mobile>
</Student>
<Student>
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student>
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student>
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>this forum is for vb.net, for vb6 you could try
http://www.vbforums.com/forumdisplay.php?1-Visual-Basic-6-and-Earlier
http://forums.codeguru.com/forumdisplay.php?4-Visual-Basic-6-0-Programming
PS. vb6 is ancient software you might want to consider a language from this century
Maybe you are looking for
-
Business users select whom to route dynamically
Hi, Can BPM help in the following scenario: 1.Bussiness users assign to who all(which users) from the roles in the next step (BPM model step)will the task be assigned. 2.Suppose there is a select box in which bussiness users selects user to whom in t
-
Smart Form: Invoice list
Hello everybody! Does a smart form exist which is designed for invoice lists? Or exists only the Smart Form and the print program and function module which selects the required data for normal invoices??? Greetings Mark
-
I am using Windows Vista. I have cleared the cache and cookies.'''
-
Dear All We have many instances where in the transfer has to be done from a vendor account to another or Customer Account to another. We are on new GL and splitting is active based on profit center as a mandatory field. We have created a substitution
-
Show Files from PC On STB?
I would like to show pictures from my PC on my Set top box and I would also like to view video files I've stored on my PC, on my STB. Is this possible? In today's day and age, one would think you can do this. Then again, I THOUGHT the "Redbox by Ve