Purchase Order text field update in Material Mater
Hi experts,
Is't possible that we can give authorization to update ONLY Purchase Order text field
under the Purchase Order text view in MM?
But while giving authorization, I could only see "Maintenance statuses of Material" I could only see status code "E" in general for Purchasing view.
Please advise if this is possible to control to give authorization to update only this Purchase order text view in MM.
Regards,
P
Hi
Please try this way
Authorization object: M_MATE_STA
Define the fields this way
Fields Possible values Meaning
ACTVT 01 User may create data.
02 User may change data.
03 User may display data.
06 User may flag data for deletion.
08 User may display change documents.
STATM Here, you specify the
maintenance status for which
the user is authorized.
regards
sunny
Similar Messages
-
Dear Gurus,
I need to maintain text in some materials in purchase order text view in material master through LSMW.
Please tell field and table where this purchase order text is stored.
I have checked some threads also but not clear.
regards
VBit is explained in docu how to find the text name object and id, and I explained it as well many many times here in the forum.
Please read docu and search threads.
text fields in the Po are subject to customizing, so I cannot give you the text id you have to use.
What speaks against LSMW?
The docu link I gave you is for LSMW, so it certainly works with LSMW
I am using it at least once a month for loading texts to any kind of object. -
The long text for purchase order text field in mm03
Hi,
Please provide me long text for purchase order field.in mm03 the view purchase order text having the long text for purchase order.this is enter when ever your creating the material.but we have table and field name for that and also how to handle this long text.please provide me urgently.
Thanks & Regards,
Radhakrishna.Hi,
A sample code for ur requirement.
TABLES : ekko, "Purchasing Document Header
ekpo, "Purchasing Document Item
thead. "SAPscript: Text Header
DATA: t_theads LIKE stxh OCCURS 0 WITH HEADER LINE.
DATA: t_tlines LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: v_ebeln_ebelp(15) TYPE c.
TYPES: BEGIN OF t_download,
ebeln LIKE ekko-ebeln,
ebelp LIKE ekpo-ebelp,
tdobject LIKE stxh-tdobject,
tdid LIKE stxh-tdid,
tdspras LIKE stxh-tdspras,
count(4) TYPE c,
tdformat LIKE tline-tdformat,
tdline LIKE tline-tdline,
END OF t_download.
TYPES: BEGIN OF t_header,
line1(20) TYPE c,
line2(20) TYPE c,
line3(20) TYPE c,
line4(10) TYPE c,
line5(10) TYPE c,
line6(10) TYPE c,
line7(10) TYPE c,
line8(10) TYPE c,
END OF t_header.
DATA: g_filename TYPE string.
DATA: gt_header TYPE STANDARD TABLE OF t_header.
DATA: gs_header TYPE t_header.
DATA: gt_download TYPE STANDARD TABLE OF t_download.
DATA: gs_download TYPE t_download,
gt_tlines LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: v_subrc TYPE subrc.
DATA: v_nb_lines TYPE i.
DATA: v_ok TYPE i.
DATA: v_ko TYPE i.
DATA: v_ow TYPE i.
DATA: p_fname TYPE string.
DATA: g_append.
SELECTION SCREEN *
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln.
PARAMETERS:
p_filedn(132) TYPE c OBLIGATORY,
p_file(132) TYPE c OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_filedn.
PERFORM file_f4_get CHANGING p_filedn.
START-OF-SELECTION.
*Select all the purchase order corresponding to select criteria
CLEAR t_theads. REFRESH t_theads.
SELECT *
FROM ekko
WHERE ebeln IN s_ebeln.
*Select all the text for P.O. header
SELECT * FROM stxh
APPENDING TABLE t_theads
WHERE tdobject = 'EKKO'
AND tdname = ekko-ebeln.
*Select Item of each P.O.
SELECT *
FROM ekpo
WHERE ebeln = ekko-ebeln.
CONCATENATE ekpo-ebeln ekpo-ebelp
INTO v_ebeln_ebelp.
*Select the text for P.O. item.
SELECT * FROM stxh
APPENDING TABLE t_theads
WHERE tdobject = 'EKPO'
AND tdname = v_ebeln_ebelp.
ENDSELECT. "select ekpo
ENDSELECT. "select ekko
DESCRIBE TABLE t_theads LINES v_nb_lines.
LOOP AT t_theads.
Read the text from pool
CLEAR thead.
REFRESH t_tlines.
CALL FUNCTION 'READ_TEXT' "#EC *
EXPORTING
id = t_theads-tdid
language = t_theads-tdspras
name = t_theads-tdname
object = t_theads-tdobject
IMPORTING
header = thead
TABLES
lines = t_tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
MOVE-CORRESPONDING thead TO gs_download.
gs_download-ebeln = thead-tdname+0(10).
IF thead-tdobject = 'EKPO'.
gs_download-ebelp = thead-tdname+10(5).
ENDIF.
gs_download-count = 0.
LOOP AT gt_tlines.
gs_download-tdformat = gt_tlines-tdformat.
gs_download-tdline = gt_tlines-tdline.
gs_download-count = gs_download-count + 1.
APPEND gs_download TO gt_download.
ENDLOOP.
CLEAR gs_download.
ENDLOOP.
END-OF-SELECTION.
Hope this helps.
please reward points if useful.
Regards
rose -
Upload of purchase order text in the material master
Now we have information of Purchase order text for all the material.
Is it possible to upload the Purchase order text using LSMW.
Some friends were telling that LSMW is not possible for Purchase Order text.
Can anyone suggest how I can upload this purchase order text for all 1000
material using LSMW program.
/if not LSMW is there any other method to upload it
thanks in advance
deepak.s.gouraDear Deepak,
there is standard direct upload i believe
go to lsmw
Execute 1st option
then inLSMW:Object Attribute screen
in standard batch/ direct input
firsr radio button
select object 005
and method 003
Program name RSTXLITF.
Then go by normal process i.e source field , field mapping...
In this way u can also upload Text in the Material master.
Rewards if helpful
Regards
Sanjay L -
Material description VS Purchase order Text when creating a PO
Hi Gurus,
When creating a PO for a specific material, I have to print a purchase order text different from the material description.
To do this, a specific text has be added to the material master data in the tab "Purchase order Text" with the italian language maintained.
But, when i start to create a new PO for this material, the short text that is shown is retrieved form the Material description and not from the Purchase order text that has been added before.
How can I do to have the purchase order text shown in the PO instead of the common material description?
Thanks in advance for your support.
Regards,
Valentino
Edited by: Valentino Rosso on Sep 9, 2009 10:58 AMHi Rajaram,
thansk a lot for your answer, it has been very helpful.
Could you please clarify me the below points?
1) Could you please confirm me that this is the functionality of the standard SAP System? That means that in case we want to put the purchase order text in to "short text" we would need to create an ad hoc development, right?
2) In case we print the PO with the purchase order text added for the material, is there any point where we can find this information for the material, or we will see just the material description from the Material Master Data?
Thanks a lot for your support.
Regards,
Roberto -
Purchase Order text in Material Master
Hi experts,
A material code ( for ex 10000000 ) is opened in plant X and is also extended to plant Y. We want to enter purchase order text in the same material code 10000000 ( thru tcode MM02 ) for plant X only. At present, the purchase order text which we entered for plant X is also depiciting in plant Y for above material code.
Our requirement is that the purchase order text which we entered for plant X should not appear in plant Y.
Please suggest.
Solutions / suggestions will be highly appreciated.
Regds,
( Rajneesh Gulati )Hi,
You can try doing in 2 ways of keeping Purchase order text.
1. If you do not want the text maintained in Plant X and not to maintain the same in Plant Y , you can delete the same in Plant Y and save so that It wont appear.
2. IF you don want the the text to be maintained in Plant Y, You need not extent the purchase order text view in plant Y.
Regards
Ram -
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. -
Purchase Order Text in Vendor Master
Hello. Does anyone have information on how to use the Purchase Order Text field in the vendor master? Everything I have read so far is in reference to SRM. We are currently running ECC6.0. I entered information into the PO Text field of the Purchasing screen on the vendor master, but cannot figure out how to get it to input to the PO header text. Any information would be greatly appreciated.
In customizing ->material management -> purchasing -> purchase order -> texts for purchase orders -> define copying rules for header texts, choose "header text" and click on text linkages. Here you can enter for source object "vendor master", and for source text choose vendor master header text.
This will copy text from vendor master to PO header text. -
How to capture purchase order text view in mm01
Hello All,
Im doing recording for one material type in BDC but im not able to capture purchase order text view while creating material.
Its not getting recorded only pls guide bcoz i have to enter purchase and sales text for new materials.
Regards,
SunnyHi Sunny,
I have a different sugesstion. Never use BDC if u have BAPI available for the same functionality.
use this BAPI BAPI_MATERIAL_SAVEDATA for material creation. Even u can create the po texts here. Check the parameters MATERIALLONGTEXT and EXTENSIONIN. in FM documentation. It is pretty clear.
Different long texts (basic data texts, purchase order texts, internal comments, sales texts, material memos) can be created for a material. This requires the fields APPLOBJECT, TEXT_NAME, TEXT_ID, and LANGU or LANGU_ISO in table parameter MATERIALLONGTEXT to contain entries. Depending on the content of field TEXT_ID, the field TEXT_NAME must have the following structure:
The material number is transferred first. If it has fewer than 18 characters, the remaining characters must be filled with blanks. If it is a material memo (LTXT), the plant key must also be transferred from character 19 onwards; in the case of a sales text (0001), this must be the sales organization and distribution channel. The combinations allowed for the four different fields are indicated in the following table:
APPLOBJECT TEXT_NAME TEXT_ID LANGU
MATERIAL Matl no. (18 char.) BEST, GRUN, or IVER Language
MDTXT Matl no. (18 char.) LTXT Language
Plant
MVKE Matl no. (18 char.) 0001 Language
Sales organization and
distribution channel
Thanks,
Vinod. -
Hi,
What is the use of maintaining Purchase order text while maintaining the material master.
I had maintained some text in the material master ( Purchase order text view ) in MM01
But while creation of PO, i am unable to see the text getting copied in to the item text of the PO.
Please expedite.
RitiGHi,
The Purchase order text is exactly that, it is text that can be copied to the Purchase order. But it does not (and should not) replace the item text.
But if you want the Purchase order text to be printed on the PO in the item text area then this is possible, the program that controls the PO printing can be told to use the Purchase order text from the Material in the PO item text instead. But the display on ME23N etc. would still show the item text even though the PO is showing the Purchase Order text from the material master.
So for printing only, it can be done but it can't be done (without user exit etc.) within the PO record itself.
Steve B -
Hi,
My requirement is to get the details of the Purchase Order Text (maintained in the material master record) for all the materials in two of my plants. Kindly let me know how to get those details.
Regards,
RameshHi Ramensh,
Refer the threadsss.
[Thread-1|Purchase Order Text]
[Thread-2|Re: Purchase Order Text]
Regards,
Shyamal -
Updating Material master purchase order text -LSMW
Dear Experts
How can update Purchase order Text through LSMW, while am doing recording system is not recording this field from material master
Regards
Ajeesh.sDear Expert
Please throw some light on this issue
Regards
Ajeesh.s -
BDC for Purchase order text updation in MM02 Transaction
Hi ALL,
I am updating purchase order text of a material in MM02 using BDC program.
I have done recording, and the program is updating text if the text field already contains some value. but,
when the field is empty and if the program tries to feed new data then it is not working.
Please help me!
regds,
RajanHi
material master purchase order long text
you can use through BDC or LSMW it is possible,
here we need to check in lsmw Direct input mentod Program name "/SAPDMC/SAP_LSMW_IMPORT_TEXTS" object name (0001) method(0001) program type (D).
Header we have --- MATNR and TEXT ID
Item ---LINE(Text line).
in header- for NAME and ID map the source fields MATNR and TEXID respectively.
OBJECT and SPRAS pass the constants.
in Item--for TEXTFORMAT pass the constant '*' and for the TEXTLINE map the input field LINE of the ITEM structure.
or else u can check in SE37 'CREATE_TEXT' , in that function module check it object Id , name , spras, lineitem, language "E"
here i mention example of text flat file,
H 100-100 best
longtext1 -
Update: Purchase order text
Hi
We would like to use the current long text of a material and update the purchase order text programatically with the same data.
How can i create the P.O. text without using BDC updates?What text do you want to load ( I mean header text or item text )
see the example to save text
report ZMPPC016
no standard page heading
line-size 120.
Constants
constants : c_r type c value 'R', " PLNTY Value
C_X TYPE C VALUE 'X', " Value for dynbegin.
c_tcode like tstc-tcode value 'CA22', " Transaction code
c_mode(1) type c value 'A', " BDC Mode
c_tdformat type tline-tdformat value '*',"Tag column
c_tdid type thead-tdid value 'PLPO', " Text ID
c_tdform type thead-tdform value 'SYSTEM'." Form name
Variables
data : v_date like sy-datum, " date
v_date1(4) type c,
v_date2(2) type c,
v_date3(2) type c,
TNAME LIKE THEAD-TDNAME,
v_mandt(3) type c,
v_matnr(18) type c,
flag type c.
Internal table for file
data : begin of t_file occurs 0,
matnr(18) type c, " Material Number
werks(4) type c, " Plant
vornr(4) type c, " Operation Number
tseq(3) type n, " Line number in the long text
text1(70) type c, " Long text
plnal(2) type n, " Group counter
end of t_file.
data : begin of t_text occurs 0,
matnr(18) type c, " Material Number
werks(4) type c, " Plant
plnal(2) type n, " Group counter
vornr(4) type c, " Operation Number
tseq(3) type n, " Line number in the long text
text1(70) type c, " Long text
end of t_text.
Internal table for MAPl
data : begin of t_mapl occurs 0,
plnnr like mapl-plnnr,
end of t_mapl.
Internal Table for PLAS and PLPO Table
data : begin of t_plpo occurs 0,
mandt like plpo-mandt,
plnty like plpo-plnty,
plnnr like plpo-plnnr,
plnkn like plpo-plnkn,
zaehl like plpo-zaehl,
end of t_plpo.
data t_long like tline occurs 0 with header line.
Work area for t_text Internal table
data : wa_text like t_text.
data: t_header like thead. " long text
Internal table for BDCDATA Structure
data : begin of itab_bdc_tab occurs 0.
include structure bdcdata.
data : end of itab_bdc_tab.
Selection-screen
selection-screen : begin of block blk with frame .
parameter : P_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
p_file = 'C:\My Documents\InputFile.txt'.
at selection-screen on value-request for p_file.
F4 value for file
perform file_get.
start-of-selection.
Get file data into Internal Table.
perform get_data.
sort t_text by matnr werks vornr plnal tseq.
Save the long text into CA22 Transaction
perform load_data.
top-of-page.
CALL FUNCTION 'Z_HEADER'
EXPORTING
FLEX_TEXT1 =
FLEX_TEXT2 =
FLEX_TEXT3 =
skip 1.
*& Form file_get
F4 Value for file
FORM file_get.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_PATH = 'C:\Temp\'
MASK = ',.,..'
MODE = 'O'
TITLE = 'Select File'(007)
IMPORTING
FILENAME = P_file
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDFORM. " file_get
*& Form get_data
Get file data into Internal Table.
FORM get_data.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = p_file
FILETYPE = 'DAT'
TABLES
DATA_TAB = t_file
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
if sy-subrc eq 0.
sort t_file by matnr werks plnal vornr tseq.
delete t_file where matnr = ''.
loop at t_file.
Get the material number from tables ZMSMI_FERR_RAW,
ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
perform get_matnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = t_file-vornr
IMPORTING
OUTPUT = t_file-vornr.
move : t_file-matnr to t_text-matnr,
t_file-werks to t_text-werks,
t_file-vornr to t_text-vornr,
t_file-tseq to t_text-tseq,
t_file-text1 to t_text-text1,
t_file-plnal to t_text-plnal.
append t_text.
clear t_text.
endloop.
else.
WRITE: / 'Error reading input file'.
stop.
endif.
ENDFORM. " get_data
*& Form call_bdc
BDC Script for CA22 Transaction
FORM call_bdc.
Screen 1010
perform bdc_screen using 'SAPLCPDI' '1010'.
perform bdc_field using 'BDC_OKCODE' '=VOUE'.
perform bdc_field using 'RC27M-MATNR' SPACE.
perform bdc_field using 'RC27M-WERKS' SPACE.
perform bdc_field using 'RC271-VBELN' SPACE.
perform bdc_field using 'RC271-POSNR' SPACE.
perform bdc_field using 'RC271-PLNNR' T_PLPO-PLNNR.
perform bdc_field using 'RC271-AENNR' SPACE.
clear : v_date,
v_date1,
v_date2,
v_date3.
v_date1 = sy-datum+0(4).
v_date2 = sy-datum+4(2).
v_date3 = sy-datum+6(2).
concatenate v_date2 v_date3 v_date1 into v_date.
perform bdc_field using 'RC271-STTAG' v_date .
perform bdc_field using 'RC271-REVLV' SPACE.
perform bdc_field using 'RC271-WERKS' SPACE.
perform bdc_field using 'RC271-PLNAL' WA_TEXT-PLNAL.
perform bdc_field using 'RC271-STATU' SPACE.
perform bdc_field using 'RC271-VAGRP' SPACE.
perform bdc_field using 'RC271-PROFIDNETZ' SPACE.
Screen 5400
perform bdc_screen using 'SAPLCPDI' '5400'.
perform bdc_field using 'BDC_OKCODE' '=OSEA'.
Screen 1010
perform bdc_screen using 'SAPLCP02' '1010'.
perform bdc_field using 'BDC_OKCODE' '=ENT1'.
perform bdc_field using 'RC27H-VORNR' WA_TEXT-VORNR.
Screen 5400
perform bdc_screen using 'SAPLCPDI' '5400'.
perform bdc_field using 'BDC_OKCODE' '=LTXT'.
perform bdc_field using 'RC27X-FLG_SEL(01)' C_X.
Screen 1100
perform bdc_screen using 'SAPLSTXX' '1100'.
perform bdc_field using 'BDC_OKCODE' '=XEIN'.
Screen 0999
perform bdc_screen using 'SAPLWB_CUSTOMIZING' '0999'.
perform bdc_field using 'BDC_OKCODE' '=CONT'.
PERFORM BDC_FIELD USING 'RSEUMOD-GRA_EDITOR' SPACE.
Screen 1100
perform bdc_screen using 'SAPLSTXX' '1100'.
perform bdc_field using 'BDC_CURSOR' 'RSTXT-TXPARGRAPH'.
perform bdc_field using 'BDC_OKCODE' '=TXBA'.
perform bdc_field using 'RSTXT-TXPARGRAPH(03)' '*'.
perform bdc_field using 'RSTXT-TXLINE(03)'
Screen 5400
perform bdc_screen using 'SAPLCPDI' '5400'.
perform bdc_field using 'BDC_OKCODE' '=BU'.
call transaction c_tcode
using itab_bdc_tab mode 'N'
update 'S'.
refresh itab_bdc_tab.
if sy-subrc eq 0 and sy-msgty ne 'E'.
v_mandt = t_plpo-mandt.
CONCATENATE v_mandt
t_plpo-plnty
t_plpo-plnnr
t_plpo-plnkn
t_plpo-zaehl into tname.
commit work.
CALL FUNCTION 'DELETE_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = c_tdid
LANGUAGE = 'E'
NAME = TNAME
OBJECT = 'ROUTING'
SAVEMODE_DIRECT = 'X'
TEXTMEMORY_ONLY = ' '
LOCAL_CAT = ' '
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
if sy-subrc ne 0.
write:/3 wa_text-matnr,24 wa_text-werks,
30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
60 ' -',
67 'Error Deleting Existing Long Text'.
endif.
else.
write:/3 wa_text-matnr,24 wa_text-werks,
30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
60 ' -',
67 'Error Executing BDC'.
endif.
ENDFORM. " call_bdc
*& Form bdc_screen
BDC Script for Screen fields
-->P_PROG Program name
-->P_SCRN Screen Number
FORM bdc_screen USING p_prog
p_scrn.
clear itab_bdc_tab.
itab_bdc_tab-program = p_prog.
itab_bdc_tab-dynpro = p_scrn.
itab_bdc_tab-dynbegin = c_x.
append itab_bdc_tab.
ENDFORM. " bdc_screen
*& Form bdc_field
BDC Script for Screen fileds
-->P_NAM Field name
-->P_VAL Field value
FORM bdc_field USING p_nam
p_val.
clear itab_bdc_tab.
itab_bdc_tab-fnam = p_nam.
itab_bdc_tab-fval = p_val.
append itab_bdc_tab.
ENDFORM. " bdc_screen
*& Form load_data
Save the long text into CA22 Transaction
FORM load_data.
loop at t_text.
move t_text to wa_text.
at new vornr.
Read the data in MAPL Table
select single plnnr from mapl into t_mapl-plnnr
where matnr = wa_text-matnr
and werks = wa_text-werks
and plnty = c_r
and loekz = space.
if sy-subrc eq 0.
Read the data from PLAS and PLPO Table
select SINGLE a~mandt
a~plnty
a~plnnr
a~plnkn
a~zaehl into t_plpo
from plpo as a inner join plas as b on aplnty = bplnty
and aplnnr = bplnnr
and aplnkn = bplnkn
where b~plnty = c_r
and b~plnnr = t_mapl-plnnr
and b~plnal = wa_text-plnal
and b~loekz = space
and a~vornr = wa_text-vornr
and a~loekz = space.
if sy-subrc eq 0.
perform call_bdc.
else.
flag = 'X'.
write:/3 wa_text-matnr,24 wa_text-werks,
30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
60 ' -',
67 'Matching routing group\Operation not found'.
continue.
endif.
else.
flag = 'X'.
write:/3 wa_text-matnr,24 wa_text-werks,
40 ' -',
45 'Material Does not Exists or Material',
82 'not Available in MAPL Table'.
continue.
endif.
endat.
if flag ne 'X'.
t_long-tdline = wa_text-text1.
t_long-tdformat = c_tdformat.
append t_long.
endif.
at end of vornr.
if flag ne 'X'.
v_mandt = t_plpo-mandt.
CONCATENATE v_mandt
t_plpo-plnty
t_plpo-plnnr
t_plpo-plnkn
t_plpo-zaehl into tname.
T_HEADer-TDOBJECT = 'ROUTING'.
t_HEADer-TDNAME = tname.
T_HEADer-TDID = c_tdid.
t_header-tdform = c_tdform.
T_HEADer-TDSPRAS = 'E'.
Save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = t_header
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = t_long
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
if sy-subrc eq 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = t_header-TDOBJECT
NAME = t_header-TDNAME
ID = t_header-TDID
LANGUAGE = t_header-TDSPRAS.
write:/3 wa_text-matnr,24 wa_text-werks,
30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
60 ' -',
67 'Long Text Loaded Successfully'.
else.
write:/3 wa_text-matnr,24 wa_text-werks,
30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
60 ' -',
67 'Error Uploading Long Text'.
endif.
refresh t_long.
else.
write:/3 wa_text-matnr, 24 wa_text-werks,
45 'Long text not uploaded'.
clear flag.
endif.
endat.
endloop.
ENDFORM. " load_data
*& Form get_matnr
Get the material number from tables ZMSMI_FERR_RAW,
FORM get_matnr.
clear v_matnr.
case t_file-werks.
when '0101'.
select single cmatnr from zmsmi_simp_raw
into v_matnr where matnr = t_file-matnr.
if sy-subrc eq 0.
if not v_matnr is initial.
clear t_file-matnr.
t_file-matnr = v_matnr.
endif.
when '0103'.
select single cmatnr from zmsmi_ferr_raw
into v_matnr where matnr = t_file-matnr.
if sy-subrc eq 0.
if not v_matnr is initial.
clear t_file-matnr.
t_file-matnr = v_matnr.
endif.
when '0102' or '0110' or '0111' or '0112' or '0113'
or '0114' or '0115' or '0116' or '0117'.
select single cmatnr from zmsmi_snap_raw
into v_matnr where matnr = t_file-matnr.
if sy-subrc eq 0.
if not v_matnr is initial.
clear t_file-matnr.
t_file-matnr = v_matnr.
endif.
endcase.
ENDFORM. " get_matnr
Reward Points if it is helpful
Thanks
Seshu -
BADI-User exit required for updating Purchase order header field -IHREZ
Hello All,
We have requirement in our business to update the purchase order header field "our reference" EKKO-IHREZ with some text field. We need a BADI/user exit that can be used for updating this field . We have checked the BADI ME_PROCESS_PO_CUST and unfortunately we are not able to use this BADI as it getting triggered in enjoy SAP transactions ME21N , ME22N etc. We are not creating the purchase order manually and we are using ME59N for creating Purchase order . Hence we are looking for some user exit/BADI that can be used in ME59N for updating the purchase order header field IHREZ.
Thanks in advance for your immediate response .
With regards,
Joseph Anand BTRY using the exist u2022 EXIT_SAPLME59_001
You can also later on add this field by BAPI_PO_CHANGE
Maybe you are looking for
-
Syncing Problem in iTunes with iPhone 5
I successfully synced my iPhone 5 this morning in iTunes for the first time but now I wish to update and sync again, it won't let me!!! What has changed?
-
Monitoring OAQ using mgw_gateway gives an odd result?
When we submit the following query: select AGENT_STATUS, AGENT_PING, LAST_ERROR_DATE, LAST_ERROR_TIME from mgw_gateway; We get this result: SQL> select AGENT_STATUS, AGENT_PING, LAST_ERROR_DATE, LAST_ERROR_TIME from mgw_gateway; MESSAGING GATEWAY IS
-
I cannot update my ipod because its says mobile device service is not started
i cannot update my ipod because it says mobile device service is not started
-
HT201317 My photos aren't streaming
My photos aren't streaming and I think everything is set up correctly. I recently restored my phone and now the photos from my iPad aren't streaming.
-
Is there a way to set up the software so that you can delay live footage? Here's what I'd like to do.... I coach volleyball so I would like to set up live video of the players performing skills. It would be set up so the camera would film them and th