Function Modules or Methods to Retrieve texts in Material Master
Hi All,
Can you get me a list of Function Modules which retrieve the text from Material Master.
My requirement is to extract texts:
Basic Text - at material level
Purchase Order text - at material level
Sales Texts - at material-sales org level
Thanks in Advance.
Sure Points for all Valuable answers
Regards
Vinayak
hi
u can get using read_text FM ask ur functionl person to give you the ID and other details required..
u can also get it from STXH table... from which even the FM gets data..
Similar Messages
-
Function module to read all the views of material data
Dear all ,
Is there any function module to read all the views of material data ?
Like we have MATERIAL_MAINTAIN_DARK for updating all the views of material data , I need a function module to read all the views of material master.
Thanks & Regards
ShivanandHello,
Check these BAPI'S
<b>BAPI_MATERIAL_DISPLAY Display Material
BAPI_MATERIAL_GET_DETAIL Determine Details for a Material</b>
Regards,
Vasanth -
How to Send Internal table to SAP Spool using Function Modules or Methods?
Hi Experts,
How to Send Internal table to SAP Spool using Function Modules or Methods?
Thanks ,
KiranThis is my code.
I still get the no ABAP list data for the spool, even tho I can see it sp01?
REPORT Z_MAIL_PAYSLIP.
* Declaration Part *
tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
infotypes: 0000, 0001, 0105, 0655.
data: begin of ITAB occurs 0,
MTEXT(25) type C,
PERNR like PA0001-PERNR,
ABKRS like PA0001-ABKRS,
ENAME like PA0001-ENAME,
USRID_LONG like PA0105-USRID_LONG,
end of ITAB.
data: W_BEGDA like HRPY_RGDIR-FPBEG,
W_ENDDA like HRPY_RGDIR-FPEND.
data: RETURN like BAPIRETURN1 occurs 0 with header line.
data: P_INFO like PC407,
P_FORM like PC408 occurs 0 with header line.
data: P_IDX type I,
MY_MONTH type T549Q-PABRP,
STR_MY_MONTH(2) type C,
MY_YEAR type T549Q-PABRJ,
STR_MY_YEAR(4) type C,
CRLF(2) type x value '0D0A'.
data: W_CMONTH(10) type C.
data: TAB_LINES type I,
ATT_TYPE like SOODK-OBJTP.
data: begin of P_INDEX occurs 0,
INDEX type I,
end of P_INDEX.
constants: begin of F__LTYPE, "type of line
CMD like PC408-LTYPE value '/:', "command
TXT like PC408-LTYPE value 's', "textline
end of F__LTYPE.
constants: begin of F__CMD, "commands
NEWPAGE like PC408-LINDA value '',
end of F__CMD.
data: P_LIST like ABAPLIST occurs 1 with header line.
*data: OBJBIN like SOLISTI1 occurs 10 with header line,
data: OBJBIN like LVC_S_1022 occurs 10 with header line,
DOCDATA like SODOCCHGI1,
OBJTXT like SOLISTI1 occurs 10 with header line,
OBJPACK like SOPCKLSTI1 occurs 1 with header line,
RECLIST like SOMLRECI1 occurs 1 with header line,
OBJHEAD like SOLISTI1 occurs 1 with header line,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_buffer type string,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname.
data: file_length type int4,
spool_id type rspoid,
line_cnt type i.
*-------------------------------------------------------------------* * INITIALIZATION *
OBJBIN = ' | '.
append OBJBIN.
OBJPACK-HEAD_START = 1.
data: S_ABKRS like PV000-ABKRS.
data: S_PABRP like T549Q-PABRP.
data: S_PABRJ like T549Q-PABRJ.
* SELECTION SCREEN *
selection-screen begin of block BL1.
parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
selection-screen end of block BL1.
START-OF-SELECTION.
s_ABKRS = PNPXABKR.
S_PABRP = PNPPABRP.
s_pabrj = PNPPABRJ.
w_begda = PN-BEGDA.
w_endda = PN-ENDDA.
get pernr.
* "Check active employees
rp-provide-from-last p0000 space pn-begda pn-endda.
CHECK P0000-STAT2 IN PNPSTAT2.
* "Check Payslip Mail flag
rp-provide-from-last p0655 space pn-begda pn-endda.
CHECK P0655-ESSONLY = 'X'.
rp-provide-from-last p0001 space pn-begda pn-endda.
* "Find email address
RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
if p0105-usrid_LONG ne ''.
ITAB-PERNR = P0001-PERNR.
ITAB-ABKRS = P0001-ABKRS.
ITAB-ENAME = P0001-ENAME.
ITAB-USRID_LONG = P0105-USRID_LONG.
append itab.
clear itab.
endif.
"SY-UCOMM ='ONLI'
END-OF-SELECTION.
*------------------------------------------------------------------* start-of-selection.
write : / 'Payroll Area : ', S_ABKRS.
write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
write : / 'System Time : ', SY-UZEIT.
write : / 'User Name : ', SY-UNAME.
write : / SY-ULINE.
sort ITAB by PERNR.
loop at ITAB.
clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
* Retrieve Payroll results sequence number for this run
select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
and FPBEG ge W_BEGDA
and FPEND le W_ENDDA
and SRTZA eq 'A'.
* Produce payslip for those payroll results
if SY-SUBRC = 0.
call function 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = ITAB-PERNR
SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
PAYSLIP_VARIANT = PAY_VAR
IMPORTING
RETURN = RETURN
P_INFO = P_INFO
TABLES
P_FORM = P_FORM.
check RETURN is initial.
* remove linetype from generated payslip
loop at p_form.
objbin = p_form-linda.
append objbin.
line_cnt = line_cnt + 1.
endloop.
file_length = line_cnt * 1022.
* create spool file of paylsip
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spool_id
TABLES
it_textdata = objbin.
IF sy-subrc EQ 0.
WRITE spool_id.
ENDIF.
DESCRIBE table objbin.
DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = spool_id
NO_DIALOG = ' '
DST_DEVICE = 'MAIL'
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT = l_no_of_bytes
* PDF_SPOOLID = l_pdf_spoolid
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
PDF = pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = pdf.
* Transfer the 132-long strings to 255-long strings
* LOOP AT pdf.
* TRANSLATE pdf USING ' ~'.
* CONCATENATE gd_buffer pdf INTO gd_buffer.
* ENDLOOP.
* TRANSLATE gd_buffer USING '~ '.
* DO.
* it_mess_att = gd_buffer.
* APPEND it_mess_att.
* SHIFT gd_buffer LEFT BY 255 PLACES.
* IF gd_buffer IS INITIAL.
* EXIT.
* ENDIF.
* ENDDO.
OBJHEAD = 'Objhead'.
append OBJHEAD.
* preparing email subject
concatenate W_ENDDA(6)
' Payslip-'
ITAB-ENAME+0(28)
ITAB-PERNR+4(4) ')'
into DOCDATA-OBJ_DESCR.
DOCDATA-OBJ_NAME = 'Pay Slip'.
DOCDATA-OBJ_LANGU = SY-LANGU.
OBJTXT = 'Pay Slip.'.
append OBJTXT.
*prepare email lines
OBJTXT = DOCDATA-OBJ_DESCR.
append OBJTXT.
OBJTXT = 'Please find enclosed your current payslip.'.
append OBJTXT.
* Write Attachment(Main)
* 3 has been fixed because OBJTXT has fix three lines
read table OBJTXT index 3.
* DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
clear OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 3.
OBJPACK-DOC_TYPE = 'RAW'.
append OBJPACK.
* Create Message Attachment
ATT_TYPE = 'PDF'.
describe table OBJBIN lines TAB_LINES.
read table OBJBIN index TAB_LINES.
* OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = ATT_TYPE.
OBJPACK-OBJ_NAME = 'ATTACHMENT'.
OBJPACK-OBJ_DESCR = 'Payslip'.
append OBJPACK.
* Create receiver list refresh RECLIST.
clear RECLIST.
RECLIST-RECEIVER = itab-USRID_long.
translate RECLIST-RECEIVER to lower case.
RECLIST-REC_TYPE = 'U'.
append RECLIST.
* Send the document
*SO_NEW_DOCUMENT_ATT_SEND_API1
call function 'SO_DOCUMENT_SEND_API1'
exporting
DOCUMENT_DATA = DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
tables
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = pdf
CONTENTS_TXT = OBJTXT
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
RECEIVERS = RECLIST
exceptions
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
others = 8.
if SY-SUBRC NE 0.
ITAB-MTEXT = 'Message Not Sent to : '.
else.
ITAB-MTEXT = 'Message Sent to : '.
endif.
* else.
* ITAB-MTEXT = 'Message Not Sent to : '.
* endif.
else.
"SY-SUBRC Not = 0
ITAB-MTEXT = 'Payroll data not found : '.
endif.
"end of SY-SUBRC = 0.
modify ITAB.
endloop. "end loop at ITAB
sort ITAB by MTEXT PERNR.
loop at ITAB.
at new MTEXT.
uline.
write : / ITAB-MTEXT color 4 intensified on.
write : / 'Emp. Code' color 2 intensified on,
12 'Emp. Name' color 2 intensified on,
54 'Email ID' color 2 intensified on.
endat.
write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
endloop. -
Process an Interactive Form in a function module or method
Hello,
If I process an interactive form in a report everthing works fine. But when I execute the same coding in a function module or method nothing works! The call of the function module fm_name returns sy-subrc = 1 (usage error).
I believe that function call of 'FP_JOB_OPEN' cause the problems. I can't spool this job in an function module or method.
What can I do for using interactive Forms in a method.
If anybody had the same problem a piece of of coding will help.
Thanks a lot in advance
Roger
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'Z_EXPORT_FORM_01'
IMPORTING
e_funcname = fm_name.
Set output parameters and open spool job
fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
fp_outputparams-getpdf = 'X'. " launch print preview
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
Set form language and country (->form locale)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
/vwk/z_tla_vw_export = wa_z_export
it_vehicle = lt_vehicle
ddinit = ddinit
ddcomplaint = ddcomplaint
ddinformation = ddinformation
ddpraise = ddpraise
ddidea = ddidea
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.Yes I did.
I have written the code as given below. It is not working either. Can you please check my code.
DATA:
FM_NAME TYPE RS38L_FNAM,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
fp_outputparams-nodialog = 'X'.
fp_outputparams-getpdf = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZHR_APPT'
IMPORTING
e_funcname = fm_name.
Set form language and country (->form locale)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
call the generated function module
CALL FUNCTION FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
T_HR = wa_emphr1
IMPORTING
/1BCDWB/FORMOUTPUT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
Thx,
John -
Function module or Method for changing a program with transport
Hi,
Can anybody please let me know if there is any Function module or Method to change a program under a Transport request
(so it needs to go to next Version for the program). I tried using
INSERT REPORT .... with all options for this command. It is changing the program successfully but all are creating the program locally.
I successfully found CIF_PROGRAM_INSERT for creating new program under a TR.
But struggling a lot to find the same kind of FM or Method to change a program.
Can anybody help?
//KothandHi,
Thanks. But i am asking for a Function module which can edit a program and keep it inside a Transport request.
This FM is to import any change request.
//Kothand -
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 -
Hi,
Can sombody let me know the logic to determine the Sales text from material master. I need to poppulated the material desc field on the order with the sales text.
I tried using STXH and FM read_text, but i doesn't help.
Thanks in Advance guysHi,
Do you want the Text from the Material master to be copied into the ORDER CONFIRMATION Output ?
If so then you can try with the READ _TEXT function module.
If you want to copy the text maintained in the Material master to Sales order then try VOTXN transaction as suggested above
thanks,
santosh -
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. -
View "Purchase Order Text" in Material Master
Hi,
I need replicated text of view "Purchase Order Text" in ECC to Material Master in SRM.
Or When We create a shopping cart in the way in which the text replicated "Purchase Order Text" from the the Material Master(ECC).
Regards
AngieFor Purchase Order text in Material Master:
use this code for Purchase Order text,
DATA: l_lsize(3) TYPE n VALUE '132'.
DATA: lwa_tline TYPE tline,
lwa_thead TYPE thead,
lwa_valid TYPE ty_input(flat file data),
lwa_temp TYPE ty_input.
DATA: lit_tline TYPE STANDARD TABLE OF tline.
lwa_thead-tdobject = 'MATERIAL'.
lwa_thead-tdid = 'BEST'.
lwa_thead-tdspras = 'E'.
lwa_thead-tdlinesize = l_lsize.
LOOP AT pu_it_valid INTO lwa_valid.
lwa_temp = lwa_valid.
AT NEW matnr.
CLEAR: lwa_thead-tdname,
lwa_tline-tdformat.
lwa_thead-tdname = lwa_temp-matnr.
ENDAT.
IF lwa_tline-tdformat IS INITIAL.
lwa_tline-tdformat = ' \ '.
ELSE.
lwa_tline-tdformat = '='.
ENDIF.
CLEAR lwa_tline-tdline.
lwa_tline-tdline = lwa_valid-text_line.
APPEND lwa_tline TO lit_tline.
AT END OF matnr.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = lwa_thead
insert = c_x
savemode_direct = c_x
TABLES
lines = lit_tline
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc = 0.
REFRESH lit_tline.
ENDIF.
ENDAT.
CLEAR: lwa_temp,
lwa_valid.
ENDLOOP. -
Uploading sales text and Purchase order text for material master
Hi,
I have created, material master with LSMW byt not updated SALES TEXT and Purchase order text with LSMW now i want to uplaod the sales and po text for material master can you give some link or ref. code to upload the text i have near 1000 items for which i want to uplaod text when i have done the recording with SHDB i have not found filed in recording.
regards,
zafarHi,
I have made the code in se38
as below but still it is not working
REPORT ZTEST_TEXT.
data: headerl like thead occurs 0 with header line.
data itab3 like tline occurs 0 with header line.
headerl-tdobject = 'MATERIAL'.
headerl-tdname = '00000000000LSMW123'. "(Material : 000000000300000560, Sorg : 0001, Dist channel: 01)
headerl-tdid = 'BEST'.
headerl-tdspras = 'E'.
append headerl.
move '*' to itab3-tdformat.
move 'Testing PO text' to itab3-tdline.
append itab3.
call function 'SAVE_TEXT'
exporting
header = headerl
insert = ' '
savemode_direct = ' '
tables
lines = itab3
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5.
IF SY-SUBRC = 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = headerl-tdobject
NAME = headerl-tdname.
ENDIF.
break-point.
regards,
zafar -
Printing long text from material master in from MM07ET
Hello,
I'm using WEE1 output condition to print labels for gr. I'm using the standard object MM07ET and I need to include in the label the long text from material master - table STXL. I know that there is a function READ-TEXT in ABAP for this but I don't have access to abap development. I need to know if it's possible to include a command in the sap scrip to retrive the long text without modifing the program SAPM07DR.
Thank you!Hi,
Sorry for the late Reply, Please use the following code in SAPSCRIPT
/: INCLUDE &EKPO-EMATN& OBJECT MATERIAL IDGRUN LANGUAGE EN
&EKPO-EMATN& material Number ( Here please maintain the Field value which is used to print Material Number )
MATERIAL is the Object Name
GRUN Is Text ID
EN Language
You can use the above code for priting long text in the SAPSCRIPT FORM. to find the object name and ID please follow the below Steps
Go to the window were you have maintained Long text... Double click on the text, then it will open a new window.. there Click on the top Goto-->Header.. here you will find the relevant data as follows:
Language: EN
Text ID : GRUN
Text Object: MATERIAL
Name: Material Code
Regards
GK. -
How to upload PO text of material master ?
dear gurus,
how to upload PO text in material master in mass , can i use LSMW or BDC ? if yes then how?
I have done the recording but LSMW is not working for PO text.
Upesh khairnar.Hi!
try using Purchasing Inforecord for this. in here you maintain master data linkage for Material Master and Vendor Master. You will just have to input the Material Number, the Vendor Account, and the Purchasing Org. In here you can maintain the PO text defaulted per Material Number. After the maintenance of Inforecord, the PO text will be reflected on the PO document.
Here is the ff Transaction Code:
- ME11 (Create Inforecord)
- ME12 (Change Inforecord)
- ME13 (Display Inforecord)
Hope this helps, Thank you.
Mik -
List of material number with PO text from material master
I want to get a list of materials number with PO text from material master. Can anybody help ?
The purchase order texts maintained in the material master are stored
as SAPScript text files in tables STXH (header) and STXL (lines). For
material master records:
Field TDOBJECT = 'MATERIAL'
Field TDNAME = material number (MARA-MATNR).
So you should be able to write a small report to extract the data. -
Hello,
When I enter a material in the sales order it throws the following error:
Material ABCD is not defined for sales org XXXX, dist ch. YY, language EN
Please check whether
A short text with the appropriate language exists in the material master record (a short text must be available in the language of either the customer or the sales org)
I have entered the correct material and have maintained the material in the correct sales org, dist. ch. The problem is due to this short text in material master.
The question is where is this short text in the material master?
Thanks,
ShankarDear Shankar,
Please go to MM02 transaction enetr your material number then select the Basic data 1 view go in to that from here you click on Additional data Tab or Cntrl+F6 here you can maintaion the Language for that material under Discriptions tab.
Once again the check the material master is maintainig for sales org XXXX, dist ch. YY or not.
I hope it will help you,
Regards,
Murali. -
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
Maybe you are looking for
-
How do I transfer the music I ripped from cds I own to a new PC with iTunes?
Greetings y'all. Some one I work with uses iTunes, and he wants to transfer all of his music from his old computer to his new computer. I went to the apple website trying to find answers. They have some pretty decent tutorials on how to transfer your
-
Logical model - 2 problems (proposal to improve)
hi, 1st problem: New entity - Add attribute - Primary UID - Apply (Unique identifier is created) After Primary UID unchecking the Unique identifier is still there, so after OK or Apply, an Error message (Incoplete Unique Identifier) is displayed. Now
-
AQ Adapter error on AIA 2.5 when Siebel sumbits orders into AIA queue
Hi all, we have an AIA 2.5 (with Patch Set 2) environment based on Oracle SOA Suite 10.1.3.4 MLR10 (single node) and Siebel 8.1.1.4 with ACR 474 components. When an order is submitted on Siebel to AIA Database Queue no issue is present on Siebel side
-
I would like to burn C.D.'s including the track's names and art. Can I do this? When I burn a C.D. and play it in a computer it won't show the track names or art.
-
How to find the TECHINICAL INFORMATION of a CHECK MARK
Hi Guys, How to find a technical information of a check mark on screen. I tried F1 AND click techinal field it showing wrong information. Thanks