Add attachments to Purchase requisitions
Folks,
In ME52N, it is possible to add attachments to a Preq. However, the specific button in the top of the screen is not available in ME51N. Is this customizable?
Hi Sivagnanam,
I tried as u mentioned but I am getting the message <b>No Service Available</b> and I am not able to attach anything.
Are u sure we can create an attachement with this.
Regards,
go4S.
Similar Messages
-
How to add a new line item to a Purchase Requisition number
Hello All,
Can anyone please provide me with some FM or BAPI to add a new line item to an existing Purchase Requisition number.
Can it be done using BAPI_REQUISITION_CHANGE; if yes, then how do I pass the parameters into the BAPI tables..?
Useful pointers would be appreciated...!!
Thanks & Regards,
Tarun Gambhir@Gautham,
Thanks for the quick reply.
I want to update the table EBAN, so should I use the parameter table XEBAN to put in the new line item and then execute..
Also to fill up this table I need to pass certain value, so can I use BAPI_REQUISITON_GETDETAIL and pass the same details as found from the same BAPI and create a new line item...
Regards,
Tarun Gambhir -
BAPI_PO_CHANGE me22n add profit center for purchase requisition number
Hello all,
I have to add an item line for a specific sales order( p_vbeln ).
for that i use BAPI_SALESORDER_CHANGE and it works and the item is inserted.
( p_posnr = sales order item and ln_etnr = schedule_line = 1 )
Now I have to maintain the specific po item line and to insert the Profit Center related to the Purchase Requisition Number that was assigned to the above sales order item like using transaction ME22N.
when i use the transaction all i have to do is to ADD the Purchase requisition number to the PO Order Number and to add the PROFIT CENTER.
for this i use BAPI_PO_CHANGE.
i colect the folowing data:
from table VBFA( vbelv = sales order number vbeln = l_ebeln)
PO Number = p_ebeln.
from table VBEP ( vbeln = sales order number, posnr = the previously inserted sales order item )
Purchase Requisition Number = l_banfn
Purchase Requisition Item = l_bnfpo
from table VBAP (vbeln = sales order number, posnr = the previously inserted sales order item )
Profit Center = l_prctr
from table EKKN
select max( ebelp )
from ekkn
into l_ebelp
where ebeln = l_ebeln.
add 10 to l_ebelp
Purchase Order Item = l_ebelp .
and i move the data:
i_t_poitem-po_item = l_ebelp.
i_t_poitem-preq_no = l_banfn.
i_t_poitem-preq_item = l_bnfpo.
i_t_poitem-acctasscat = cc_x.
APPEND i_t_poitem.
i_t_poitemx-po_item = l_ebelp.
i_t_poitemx-po_itemx = cc_x.
i_t_poitemx-preq_no = cc_x.
i_t_poitemx-preq_item = cc_x.
i_t_poitemx-acctasscat = cc_x.
APPEND i_t_poitemx.
i_t_poaccount-po_item = l_ebelp.
i_t_poaccount-itm_number = p_posnr.
i_t_poaccount-SCHED_LINE = ln_etnr.
i_t_poaccount-profit_ctr = l_prctr.
APPEND i_t_poaccount.
i_t_poaccountx-po_item = l_ebelp.
i_t_poaccountx-profit_ctr = cc_x.
APPEND i_t_poaccountx.
then i use the function BAPI_PO_CHANGE:
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln
testrun = l_test
TABLES
return = i_t_return_po
poitem = i_t_poitem
poitemx = i_t_poitemx
poaccount = i_t_poaccount
poaccountx = i_t_poaccountx.
BUT i get the folowing result ( messages in return table)
Insert item for PO-order
Message: Changing of PO using Enjoy BAPI unsuccessful ;
Message: Purchase order item 00120 still contains faulty account assignments ;
Message: Enter Profit Center ;
what should i do?
best regards,
emiliahello,
i debugged the function.
first the data from poaccount is copied in lt_account.
then this happens:
PERFORM get_current_data
TABLES poitem poschedule poaccount
pocondheader pocond
extensionout
poexpimpitem allversions popartner
potextheader potextitem return
USING
l_po lf_header_currency
CHANGING
expheader exppoexpimpheader.
exppoexpimpheader = poexpimpheader. "foreign trade export workaround
after this form is executed poaccount-profit_ctr is empty.
lt_account-profit_ctr in not empty but then it is not anymore.
in the form this happens:
item data
CALL METHOD im_po->get_items
IMPORTING
ex_items = lt_items.
LOOP AT lt_items INTO an_item.
l_item ?= an_item-model.
CALL METHOD l_item->get_data
IMPORTING
ex_data = ls_mepoitem.
ls_mepoitem-ebeln = ls_header-ebeln.
APPEND ls_mepoitem TO lt_item.
schedules
accountings*
CALL METHOD l_item->get_po_accountings
IMPORTING
ex_accountings = lt_accountings.
LOOP AT lt_accountings INTO an_item.
l_accounting ?= an_item-model.
CALL METHOD l_accounting->get_data
IMPORTING
ex_data = ls_mepoaccounting.
ls_mepoaccounting-ebeln = ls_header-ebeln.
APPEND ls_mepoaccounting TO lt_account.
ENDLOOP.
item conditions
foreign trade (item data; EIPO)
ENDLOOP.
so it acctualy copies every item from purchase number ebeln in lt_item.
for each one of them it copies the account data into lt_account.
so the last loop is for the item that i want to enhance.
here it copies all the necessary data in lt_account except of course the profit center because that's the one that i need to insert.
after this loop there is a form:
PERFORM move_account_out TABLES lt_account
ext_poaccount
USING header_currency.
where the ext_poaccount is the poaccount parameter.
this form:
clears ext_poaccount.
copies the data from lt_account into ext_poaccount.
and returns the ext_poaccount with the empty Profit center field
and so after performing get_current_data my parameter is deleted.
then it's almost the end of the function and nothing else related to the poaccount parameter.
so it's no use for me to insert the field Profit_Center?
is there another FM that i should use to be able to insert the profit center?
what should i do?
Best regards,
Emilia -
Add new line item to Purchase Requisition
Hello All,
I want to add a new line item to the exixsting Purchase Requisition. The documentation for BAPI 'BAPI_REQUISITION_CHANGE' says that new items cannot be added using this BAPI. Is there any other BAPI or FM that does this? Thanks,
ChandniHi,
Try using ME_UPDATE_REQUISITION.
Thanks,
Naren -
Add a item note in Purchase requisition
Hy Chaps,
I am using BADI CHANGE_BEFORE_SAVE_MRP to change begin and end date in Purchase Requisition.
To make the user award of it, I would like to insert a note in the Purchase requistion text.
Did any one experiment it?
Thanks
VincentHi my-self,
I found
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = LS_HEADER
INSERT = LV_INSERT
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = LT_LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
tks -
I am trying to download the attachments of a purchase requisition to a folder in the application server. The file downloads correctly but cannot be read when extracted to the PC using transaction CG3Y. The error tells me that the file has been damaged beyond repair. Could you help me correct my code so as to avoid damaging the file?
LOOP AT t_links INTO w_links.
ADD 1 TO: w_count ,
w_attach.
w_document_id = w_links-instid_b.
CLEAR w_filter.
REFRESH: t_header ,
t_contents.
CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
document_id = w_document_id
filter = w_filter
TABLES
object_header = t_header
object_content = t_contents
EXCEPTIONS
document_id_not_exist = 1
operation_no_authorization = 2
x_error = 3
OTHERS = 4.
CASE sy-subrc.
WHEN 0.
CLEAR: w_filename ,
w_extension.
LOOP AT t_header INTO w_header.
CASE w_header-line+0(12).
WHEN '&SO_FILENAME'.
SHIFT w_header-line LEFT BY 13 PLACES IN CHARACTER MODE.
SPLIT w_header-line AT '.' INTO w_filename
w_extension
IN CHARACTER MODE.
CONCATENATE wp_banfn
w_filename
INTO w_filename.
CONCATENATE wc_file
w_filename
w_extension
INTO w_file.
EXIT.
ENDCASE.
ENDLOOP.
OPEN DATASET w_file FOR OUTPUT IN BINARY MODE.
CASE sy-subrc.
WHEN 0.
LOOP AT t_contents INTO w_contents.
TRANSFER w_contents TO w_file.
ENDLOOP.
CLOSE DATASET w_file.
SELECT COUNT(*)
FROM zmm_mro_dash_att
WHERE banfn EQ wp_banfn
AND links EQ w_file.
CASE sy-dbcnt.
WHEN 0.
w_zmm_mro_dash_att-mandt = sy-mandt.
w_zmm_mro_dash_att-banfn = wp_banfn.
w_zmm_mro_dash_att-links = w_file.
INSERT zmm_mro_dash_att FROM w_zmm_mro_dash_att.
CASE sy-subrc.
WHEN 0.
COMMIT WORK.
WHEN OTHERS.
ROLLBACK WORK.
ENDCASE.
ENDCASE.
ENDCASE.
ENDCASE.
ENDLOOP.LOOP AT t_links INTO w_links.
w_folder_id-objtp = w_links-instid_b+0(3).
w_folder_id-objyr = w_links-instid_b+3(2).
w_folder_id-objno = w_links-instid_b+5(12).
w_object_id-objtp = w_links-instid_b+17(3).
w_object_id-objyr = w_links-instid_b+20(2).
w_object_id-objno = w_links-instid_b+22(12).
REFRESH: t_objcont,
t_objhead.
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
folder_id = w_folder_id
object_id = w_object_id
TABLES
objcont = t_objcont
objhead = t_objhead
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
object_not_exist = 6
object_no_authorization = 7
operation_no_authorization = 8
owner_not_exist = 9
parameter_error = 10
substitute_not_active = 11
substitute_not_defined = 12
system_failure = 13
x_error = 14
OTHERS = 15.
CASE sy-subrc.
WHEN 0.
READ TABLE t_objcont INTO w_objcont INDEX 1.
CASE sy-subrc.
WHEN 0.
CASE w_objcont-line+0(17).
WHEN '&SO_KProObjectID='.
w_loio_object = w_objcont-line+17.
ENDCASE.
ENDCASE.
CLEAR w_phio_object.
CALL FUNCTION 'SO_LOIO_PHIO_GET'
EXPORTING
loio_object = w_loio_object
IMPORTING
phio_object = w_phio_object
EXCEPTIONS
kpro_inconsistency = 1
x_error = 2
OTHERS = 3.
CASE sy-subrc.
WHEN 0.
CLEAR w_comp_id.
LOOP AT t_objhead INTO w_objhead.
CASE w_objhead-line+0(13).
WHEN '&SO_FILENAME='.
w_comp_id = w_objhead-line+13.
ENDCASE.
ENDLOOP.
REFRESH: t_data_txt,
t_data_bin.
CLEAR w_comp_size.
CALL FUNCTION 'SCMS_R3DB_GET'
EXPORTING
crep_id = 'SOFFDB'
doc_id = w_phio_object-objid
comp_id = w_comp_id
IMPORTING
comp_size = w_comp_size
TABLES
data_txt = t_data_txt
data_bin = t_data_bin
EXCEPTIONS
error_import = 1
error_config = 2
OTHERS = 3.
CASE sy-subrc.
WHEN 0.
CONCATENATE wc_file
wp_banfn
w_comp_id
INTO w_filename.
CALL FUNCTION 'HR_CA_DOWNLOAD_TO_APPSERVER'
EXPORTING
filename = w_filename
filesize = w_comp_size
TABLES
data_tab = t_data_bin
EXCEPTIONS
invalid_filesize = 1
no_authority = 2
dataset_open_error = 3
OTHERS = 4.
CASE sy-subrc.
WHEN 0.
SELECT COUNT(*)
FROM zmm_mro_dash_att
WHERE banfn EQ wp_banfn
AND links EQ w_filename.
CASE sy-dbcnt.
WHEN 0.
w_zmm_mro_dash_att-mandt = sy-mandt.
w_zmm_mro_dash_att-banfn = wp_banfn.
w_zmm_mro_dash_att-links = w_filename.
INSERT zmm_mro_dash_att FROM w_zmm_mro_dash_att.
CASE sy-subrc.
WHEN 0.
COMMIT WORK.
WHEN OTHERS.
ROLLBACK WORK.
ENDCASE.
ENDCASE.
ENDCASE.
ENDCASE.
ENDCASE.
ENDCASE.
ENDLOOP.
Hope this helps. -
Purchase Requisition Attachement Should not be Modified when it is released
Hi Experts,
I've a requirement that, In ME52N, if the Purchase Requisition is Released then, the user should not add or delete or change the Attachments. Pl help me in this how to do.
Regards
Rajiv.Thanks giri.
For the following reasons, the billing documents are not released to accounting.
1. If the user wrongly chosen the billing type for the delivery.
2. After creating condition type, it has to be assigned in COPA. If we forgot to do it, billing doc will not released.
Our requirement is that if the billing document is not able create accounting document, the billing document itself should not be generated.
Hope this will be suffice to understand my issue and suggest a suitable solution.
Points will be rewarded.
Regards,
Kumar. -
How to change line type on EAM Purchase Requisitions
When an EAM Work Order is released, we get Purchase Requisitions with the Line Type as the Purchasing Options default. This can be changed on the req but there is no option to select the req line type on the EAM Work Order page.
There's a Line Type field on the EAM Work Order page but it's different from the Requisition Line Type.
Just wondering what are our options to give users the ability to select req line type from EAM Work Order page. We know personalization is an option but we'd need to add a brand new field and even if we do, we are unsure that ReqImport will actually use this new field.
Workflow extensions could also be a solution and was hoping that someone out there would have some tips and tricks to share.
Regards,
SanjibI think the only way is to:
1) read the address data from Matrix 178 and keep the data in your Add-On
2) delete the original address (activate the menu item (ID = 1293) or send Ctrl-K via Application.SendKeys)
3) "click" on "Define new"
4) and enter the data you have read in 1) into the cells of Matrix 178 again...
HTH -
Purchase Requisition for Third party direct
Hi Experts,
When I am creating a third party direct sales order, a purchase requisition will be automatically triggered from it.
I can see the purchase requisition number in the item details (schedule lines) of sales order.
Please tell me how can I change the source of supply. For me it is defualt as purchase info record but I want to use Contracts instaed of infor records.
Can anybody tell Is there any customizing settings for it ?
Thanks.
Nishant.You shouldn't have to do any config settings. This is standard. So create your contract and release it. In the source list add the vendor and enter the contract number in the agreement field and subject it to MRP as well as fixing the vendor and blocking the other vendor in the source list. Re run MRP and the purchase reqs will reference the contracts. Make sure the validity date of both the contract the the line item in the source list are long enough to capture all reqs.
-
Error While Creating Workflow for Purchase Requisition Rejection
HI Experts,
Purchase Requisition No is not Displaying in the Business Workplace Inbox after my Work flow got triggered.
In Work flow i am Using the Task 97600004 which i copied from the Standard Task 65400032. This Task i called in the Activity Step having Work Item Display Tab. In this Tab while i am checking at Work Item Text for Identification of Work item in work flow inbox level it is Giving Error "Container element '_WI_OBJECT_ID' does not exist and also Insert Expression is in Disable Mode.
In Business Workplace Inbox i am getting message as "Purchase requisition 00000 rejected".
Please Suggest where i am Committing Error.
Thanks in Advance
Srikanth KumarHI.
I Have Checked the work flow as suggested Dheepak
In Start Event of Work flow i declared BUS2105 as BOR Object . The Task which i copied contains BUS2009 as default.
As Raj Suggested In Task i have Created a New Element BUS2105 at Container Tab and set binding in task and set the Binding between Work flow and Task. Now it is working fine and i am getting the PR No in the Message of SBWP inbox.
But i Having one more doubt regarding this issue only Why BUS2009 BOR object Type is not working which is the Task as default even though its binding is set between work flow and task?
Thanks Dheepak and Raj for Your Valuable Suggestions. My gmail id is srikanth537. Can u add me In your Friends list.
Thanks
Srikanth Kumar
09937876902
Edited by: Srikanth Kumar Talasu on Dec 23, 2008 11:59 AM -
Creation of Purchase Requisition from a BID
Hi,
I am trying to create a purchase requisition from a bid instead of a purchase order. Does anyone have any idea on this?
Thanks
SunnyHello,
are you trying to create a local SC or a backend PR ?
If you are in classic mode (so PR and not SC), you could try to derive the PO flow to create a PR instead.
But this is not really clean.
The best way is to add a new button "Create PR" in quote screen (or rename the create PO if you don't use it), linked to your own fcode processing and finally call the META_REQUISITION_CREATE in SRM (instead of META_PO_CREATE).
The last point would be to create a link BID_INV>BID>PR to be displayed in document flow. You have to check if it is possible, because sometimes the system is designed for limited possible flows and does not take into account the flow you want to add.
In standard, you can create directly a backend PO only if the bid was created from a SC in the sourcing cockpit. Otherwise use local or extended PO (replicated in R/3).
If this is the case, FM BBP_PD_SC_TRANS_MULTI_BE_PO will transfer the initial SC items to next document, which is a backend PO. You would need to operate some changes here to create PR.
Rgds
Christophe -
LSMW Upload of Purchase Requisition MM
Hi Experts,
I have a quick requirement to create a LSMW project for creating the PR(Purchase Requisition) in the SAP system from a legacy data by means of uploading.
I want the data of the header and item to be uploaded in one go. I searched the forums and came to know that
we can use batch input but the problem is that it will upload one by one which does not suffice my requirement.
Please suggest me how to achieve this.
Thanks and Best Regards,
SahilHeader and item is always loaded in one go. I have never seen an object in SAP migration where you load header and items individually.
SAP says in FAQ note 499627 - FAQ: BAPIs for purchase requisitions
Can I use the BAPI BAPI_REQUISITION_CHANGE to add new items?
Answer:
No.
However, we can create a BAPI that has this function for you.
This takes one to three days depending on the features, and is subject to charge.
...but this is for BAPI_REQUISITION_CHANGE , when you create requistions you usually use BAPI_REQUISITION_CREATE. so give it a tryto see if you can load several item to one PR.
if it does not work with the BAPI, then record the old ME51 transaction (ME51N is not suitable for batch input) -
Changes in Budget checking during creation of purchase requisition
Hi Experts,
My client wants changes the current Internal Order BUget checking. Currently Budget checking happens with availability control ie. 105% Suppose current budget is 8000. It will add 5% and Purchase reqn checks the fund available with 8400 less budget utlised, but client wants 8000 less budget utilised as they want to keep 5% aside for the unforseen cases.
Cilent does not want to change the current availability setting i.e 105%, retaining that availability check, client wants to check the availability excluding tolerance. What is the solution for this.
Appriciate your immediate response.
Thanks & regards
Veda PanditHi,
I think you shall set 100 % limit for purchase order and purchase requisition and 105% for good receipt.
You can do so in customizing "Define Tolerance Limits for Availability Control" , using the activity group.
Paolo -
User exit for Purchase order & Purchase requisition.
Hi,
I need the user exits/BADIs/BTE in the following events.
1) Just before saving Purchase requisitions and After saving purchase req ( Create and Change)
2) Just before saving Purchase Order and After saving purchase Order ( Create and Change)
Regards,
Ganesh Nama.Hi Experts,
I want to change delivery date in PR while creating purchase requisition ME51n.
Means need to add 7 days in delivry date field when ever it is todays date (sy-datum).
Please suggest suitable badi or EXIT.
I tried in BADI..ME_PROCESS_REQ_CUST... in PROCESS_ITEM methode
data : preqdata type mereq_item,
v_lfdat type sy-datum.
prereq_x type mereq_itemx.
preqdata = im_item->get_data( ).
if preqdata-lfdat = sy-datum.
prereq_x-lfdat = 'X'.
call function 'CALCULATE_DATE'
exporting
days = '7'
months = '0'
start_date = sy-datum
importing
result_date = v_lfdat .
preqdata-lfdat = v_lfdat.
call method im_item->set_datax( prereq_x ).
call method im_item->set_data( preqdata ).
endif.
But systems is ignoring thi change and again coming in same badi ..so in loop.
Please tel any other way to make change is delivery date field.
Thank you.....!!!!
Nilesh. -
Purchase Requisition Release Procedure Modification
Hi
In Purchase Requisition Release, we have two deviations in business requirement from standard SAP behaviour:
1. In multistep release, system allows PR release to be revoked by a lower level release authorized person even though higher level release has been done. Example, PR Release has release codes A1, A2 and A3, A2 can revoke release even after A3 has released the same. How do I prevent this from happening?
2. If business requirement is to have release procedure based on item cost per unit and not on total value of the line item, how can this be achieved?
Appreciate any guidance on these issues
Thanks
SriramHi,
There is BADI ME_REQ_POSTED
in method POSTED you can write your code to trigger the workflow and get the information related to release strategy and
Purchase requisation .
for more than one PR use below logic .
LOOP at im_eban into gwa_im_eban .
concatenate gwa_im_eban-banfn gwa_im_eban-bnfpo into gwa_objkey .
add data into container -----------------
gwa_event_container-element = 'PurchaseRequisition'.
gwa_event_container-value = gwa_im_eban-banfn.
append gwa_event_container to gi_event_container.
clear: gwa_event_container.
gwa_event_container-element = 'ItemOfRequisition'.
gwa_event_container-value = gwa_im_eban-bnfpo.
append gwa_event_container to gi_event_container.
get the other details and create event to start workflow .
select single * from eban into lwa_eban where banfn = gwa_im_eban-banfn
and bnfpo = gwa_im_eban-bnfpo .
if sy-subrc <> 0 .
call function 'SWE_EVENT_CREATE'
exporting
objtype = 'BUS2009'
objkey = gwa_objkey
event = 'zcreated'
tables
event_container = gi_event_container
exceptions
objtype_not_found = 1
others = 2.
ENDLOOP .
Hope this will resolve your issue.
Thanks and Regards,
Deepanker Dwivedi
Maybe you are looking for
-
Clarification on Master - Detail events usage on OBIEE 11g dashoards
Hi , Can Master - Detail events feature be used within two different analysis on dashboard ? If yes , please let me know how . If no , are there any alternatives for the below requirement : 1. I have a pivot table consisting of one dimension hierarch
-
How do we enable Variable Substitution during Contract Generation
Hello experts, I am working with the Contract Generation Variable Library and according to some of the Help documents, it is possible on the Contract Tokens to override the default values during Contract Generation. I am not sure why, but on our syst
-
Report for listing contact person with customer
Hello, we use the tables adrc, adrp, kna1, knvv and now I want to know if somebody has a ready report, where I can put the country-id in (f.e. 'it') , so that this reports lists all contact persons with their customer and their adress. Does anybody s
-
My main table is SR_TECHS which has tech id and Techname My second table and block is sr_tech_calendar. Here tech_name is a non-database field. When I type J% in the Tech_name field and query, I should be able to get all tech_names starting with 'J'
-
I am currently working on a Captivate 2 project. In the past I have had to break up projects because of the memory issue and link them together. I have always done this using the .swf output. To make life a litttle easier I am looking to link 3 short