Add purchase order in SAP with sdk
Hi Experts:
I am doing an aplication for to export a purchase order to SAP with the SDK and I need to read the document number of the last purchase order that was added.
Wich method can I use?
Thanks.
Hi Silvia,
You can use the GetNewObjectKey method right after you have created a new document. You can then get the DocNum using the GetByKey method.
Here an example in VB.NET (if you use C#, it is easy to translate):
'We declare a new document of type delivery
'and set all the necessary properties and values
'We then add the new delivery note
If oDeliveryNote.Add = 0 Then
Dim tmpDel As Documents = vCmp.GetBusinessObject(BoObjectTypes.oDeliveryNotes)
'Then using the GetByKey method together with the GetNewObjectKey method,
'we can get all kinds of interesting info about the newly created delivery note
If tmpDel.GetByKey(vCmp.GetNewObjectKey) Then
'Let's populate some variables that we declared earlier
DelNr = tmpDel.DocNum
NumAtcard = tmpDel.NumAtCard
CardCode = tmpDel.CardCode
DocType = tmpDel.UserFields.Fields.Item("U_type").Value
End If
End If
The same code applies to all document types.
Good luck,
Johan
Edited by: Johan Hakkesteegt on Feb 13, 2012 12:19 PM
Similar Messages
-
Steps to create a purchase order in SAP r/3
Hi All,
I need to create a purchase order in SAP R/3,I am very new to SAP R/3 just started using material managements module in R/3.Could any one please help me to know what all steps i need to take for creating a PO.Do i require some pre-requisite data in R/3?
Waiting for your reply!
Thanking you.
Regards,
Namrata.Trigger
A purchase order needs to be created, and the vendor is known
Business Process Description Overview
A purchase order is a legal document issued by the buyer to the vendor to supply materials or service at the agreed price, terms and conditions. The Purchase Order forms the basis for all follow-on activities like Goods Receipt, Invoice Verification, etc. The Purchase Orders can be created directly by entering all the required data, copying already created purchase order, with reference to an RFQ/Contract or with reference to a PR.
Purchase Order creation is possible only if sufficient budget allocation is there for the Fund Centers. It is not possible to create Purchase Orders for a Vendor who is blocked for procurement or not maintained in source list for that item. Also it is not possible to create PO for Quantity more than the PR quantity.
All the price components which are to be paid to vendors and requires to be inventoried has to be included in PO.It is possible to add different vendors for delivery costs. The tax codes should be correctly maintained in PO for the purpose of Cenvat availment etc.
The payment term defaulted from Vendor Master or RFQ has to be verified and changed if required.
The incomplete Purchase Orders can be saved as HOLD document and later completed and saved thru Change PO menu
Input - Required Fields Field Value/Comments
Vendor Vendor number
Purchasing Organization 1000
Purchasing Group Purchasing Group code
Date Purchase order date
Account assignment category Where costs will be allocated
Delivery Date Anticipated Delivery Date
Plant For which plant we are buying the material
Output - Results Comments
Purchase order document Can be changed, displayed or printed which can then be mailed to vendor
Tips and Tricks
The Purchase Orders can be created directly by entering all data required for creating PO or by copying another PO or with reference to RFQ/Contract/PR.To create a purchase order by copying existing document (PO/RFQ/PR), you can either select the desired document in the document overview .and adopt it in the current purchase order in the right-hand area of the screen using the ADOPT button .In addition you can drag it onto the shopping basket symbol with the left-hand mouse button.
Click the Personal Settings button on the tool bar, this function is for default information for purchase order header data and also purchase order item data. This will reduce the amount of redundancy in the data entry, i.e. plant, company code.
One Purchase Order may be created for several purchase requisitions
Procedural Steps
1.1. Access transaction by:
Via Menus Logistics èMaterials ManagementèPurchasingèPurchase OrderèCreateèVendor/Supplying Plant Known.
Via Transaction Code ME21N
1.2. Double-click
On screen Create Purchase order
On screen select Domestic Purchase order in this screen . You can also select other document if you want to create other. Here drop down menu is available.
Click to enter the organization data.
Screen will change in the header; enter data as given in the table below:
Field Name R/O/C Description
Purchasing Org. R Enter the purchasing organization code.
Example: 1000
Purch. Group R Enter the purchasing Group which is procuring the material
Example: P01
Company Code R Enter the company code under which above purchasing
Organization is.
Example: 1000
After entering the organization data enter the vendor or material supplier in the field here drop down is available.click to see the drop down.
Field Name R/O/C Description
Search term O Text that describes the vendor in more detail.
Example: MICON
Vendor O Description of the vendor.
Example: 100008
Click .
System displays all possible entries available as per data entered
Restrict value range (1) 1 Entries found
To select required Vendor Click .
Click .
Vendor selected
Now go to ,here the system will pick up the data automatically from the vendor master but if you want to chane the data you can change the data. Here drop down menu is available.
Now go to to mainatin the text.
After maintaining the text if you want to see or change the vendor address click and do the amendments.
Now Go to and click to enter the Items and other data as per the table given below:
Field Name R/O/C Description
Account Assignement R Key that identifies specific settlement receiver types such as cost centers, internal orders, work orders, asset accounts, or project WBS elements.Example: K
drop down menu is available here.
Item Cateogry O How the procurement of a material is controlled.
Drop down menu is available here.Example: Standard
Material R Here you will enter the material to be purchased from the
Vendor.
Here also drop down menu is available. Use the following
to select the material. Example ZROH-DEMO
In the figure above enter the search cretira for the material for example ZROH-DEMO and click
. The follwing result will appear on the screen select the line item and click to select
the material.
Short Text R Enter here short description about the material,if the text is not
automatically picked up from the material master.
PO Quantity R Enter here quantity to be ordered.
Example 10
Order unit R Here we enter the order units of measurement.
Here also drop down menu is available.
Example : KG
Category of delivery date O Here you can enter deleviery date format.
Here also drop down menu is available.
Example : Day format
Delivery date R Enter the delivery date. You can use the calender provided by
the system.
Example : 28.02.2006
Net price R Enter the net price of the material here
Example : 1000 INR
Material group R Enter the material group to which that material belongs.Here
also drop down menu is available. This field is also automatic
picked up field.
Example : M10001
Plant R Enter the plant code for which you are purchasing the material
Here also drop down menu is available.
Example : 1100
Storage location O Here you will enter where the material is to be stored. Drop
Down menu is available here.
Example WH01
Click Enter and system will give you message
You will now see the screen
Field Name R/O/C Description
Cost Centre R The purchase is done for which purpose. Here also drop down
Menu is available.
Example: 11050 for CDU/VDU /SGU OP
G/L Account R G/L account from which payment will be done.
It will be automatically be picked up from the material group
You can change it also.
Unloading Point O Specifies the point at which the material is to be unloaded.
Recipient O Specifies the recipient for whom the material is destined.
Click to see and to change the Tax Code at item level.
Select to view the taxes applied on the line item.
click to go back to the previous screen .
On the main screen in the same tab if you want to change the taxe select the tax code from the drop down available
After selection again, Select to view the taxes applied on the line item.
If you want to add more conditions click tab and enter the conditions from the drop down
You can also maintain the text at item level by clicking tab.
After completeing this all click to check wether here is any error in the purchase order , If there will not
↓
any error then on the screen following line will appear.
If there will be some error the system will throw the message on the screen
select the line item and click to see the detail of the error.
close this window now and goto main screen to rectify the error.
After rectifying the error again click to check wether here is any error in the purchase order.
Now click to save the purchase order, after clicking the button the following message will appear -
How to add Purchase Order entry using B1WS?
Hi,
I have implemented B1WS in DI server, I am trying to add purchase order entry, but after adding it via B1WS, I am not able to find entry in SAP;
My code using B1WS:
public void SAPPurchaseOrder(string _SID)
_PIService = new PurchaseInvoicesService();
Document doc = new Document();
doc.Address ="ab";
doc.AgentCode = "ab";
doc.BaseAmountSCSpecified = false;
doc.CardCode = "VEND7";
doc.CardName = "Baker & Taylor";
doc.DocDate = DateTime.Now.Date;
doc.CreationDate = DateTime.Now.Date;
doc.DocType = DocumentDocType.dDocument_Items;
doc.DocumentStatus = DocumentDocumentStatus.bost_Open;
doc.BaseAmount = 100000;
doc.DocCurrency = "USD";
MsgHeader msgHeader = new MsgHeader();
msgHeader.SessionID = _SID;
msgHeader.ServiceName = MsgHeaderServiceName.PurchaseInvoicesService;
msgHeader.ServiceNameSpecified = true;
_PIService.MsgHeaderValue = msgHeader;
_PIService.Add(doc);
Also, I found error while I have use "ADD FUNCTION" as;
can not empty list of tables, doc1, doc3 and doc10
Please suggest me a proper entry flow or code to implement.
Thank you.
Piyush
(Rob IT team - Parabox Media Group)Hello,
Just like DI API, you need add doc lines to purcahse order, here is a sample to add a purchase order.
Public Function Add() As DocumentParams
Dim myPOParams As DocumentParams = Nothing
Try
' Create Input parameters
Dim poDoc As Document = New Document
poDoc.DocDueDate = Date.Now
poDoc.CardCode = "V10000"
Dim docLine1 As DocumentDocumentLine = New DocumentDocumentLine
docLine1.ItemCode = "A00001"
docLine1.Quantity = 1
docLine1.TaxCode = "NY"
poDoc.DocumentLines = Array.CreateInstance(docLine1.GetType(), 2)
poDoc.DocumentLines.SetValue(docLine1, 0)
Dim docLine2 As DocumentDocumentLine = New DocumentDocumentLine
docLine2.ItemCode = "A00002"
docLine2.Quantity = 1
docLine2.TaxCode = "NY"
poDoc.DocumentLines.SetValue(docLine2, 1)
' Create Service
myPOService = New PurchaseOrdersService
' Create Header
Dim msgHeader As MsgHeader = New MsgHeader()
msgHeader.SessionID = GlbData.sessionID
msgHeader.ServiceName = MsgHeaderServiceName.PurchaseOrdersService
msgHeader.ServiceNameSpecified = True
myPOService.MsgHeaderValue = msgHeader
' Call command with output return
myPOParams = myPOService.Add(poDoc)
MsgBox("Purhcase Order added: " + myPOParams.DocEntry.ToString(), MsgBoxStyle.DefaultButton2)
Catch ex As System.Exception
MsgBox(ex.Message, MsgBoxStyle.DefaultButton2)
End Try
Return myPOParams
End Function
Kind Regards
-Yatsea -
How can I send purchase order through SAP mail ?
How can I send purchase order through SAP mail ? Can any one explain whts the NACE settings?
just do it as <b>Anji reddy</b> said to you ...or else ... in the purchase order trascation ...print it ... so that it will generate the spool request for that purchase order ....
so the the belwo program is for sending <b>the Spool Request data as Email to any Email id ...</b>
The code below demonstrates how to retrieve a spool request and email it as a PDF document. Please note for the below program to process a spool request the program must be executed in background otherwise no spool request will be created. Once you have had a look at this there is an modified version of the program which works in both background and foreground. Also see transaction SCOT for SAPConnect administration.
*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_sender LIKE somlreci1-receiver
DEFAULT '[email protected]',
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
* Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
* Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
* Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
* Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
* Write statement to represent report output. Spool request is created
* if write statement is executed in background. This could also be an
* ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
*** Alternative way could be to submit another program and store spool
*** id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
* to sap-spool
* spool parameters %_print
* archive parameters %_print
* without spool dynpro
* and return.
* Get spool id from program called above
* IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
* FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
* FORM get_job_details *
FORM get_job_details.
* Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
* FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
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.
CHECK sy-subrc = 0.
* Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output 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.
ENDFORM.
* FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
* perform send_email using p_email2.
ENDFORM.
* FORM send_email *
* --> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
* Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
* CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
* If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
* Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
* FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
* Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
* Fill the document data.
w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
* Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
* Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
* Populate zerror return code
ld_error = sy-subrc.
* Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
Girish -
Handling Purchase Orders in SAP Learning Solution
Hi all,
We are currently looking into having purchase orders closely integrated in our SAP Learning Solution, meaning that all courses, internal and external, that comes with a prize have purchase order information on it. Meaning the manager approves the purchase order (and thereby the participation on the course) in a workflow.
The approval yields a course booking and Finance has all the needed information based on cost center and organization data.
Please help as we are currently seeing this task as almost impossible to handle in the current setup.
Best regards
Jakob Stigaard SørensenNoone has worked with Purchase Orders in connection with participation in courses before, find that a bit scary Not sure how we'll handle this development than...
//Jakob -
Item text in Purchase Order getting updated with info. record Purchase Order Text
Hello All,
I am working in a roll out project and facing issue in text repeating twice for the line item in the Purchase Order for the new company code for which rollout is happening
Issue:
Item text in Purchase Order getting updated with info. record Purchase Order Text
01) PO Text is maintained in the material master under "Purchase Order Text" tab
02) The PO text that is maintained in material master is getting updated in the Purchase Info. Record
03) When Purchase Order is created, the "Item Text" gets updated in the Purchase Order automatically only for the new company code for which rollout is happening. when printed, this results in the text getting duplicated twice
03.1) this behavior is not observed in the Plants/ Company code that is already Live
Configurations in the system:
The copying rules for the "Texts for Purchase Orders" is
Source Object = "Info Record", Source Text="Purchase Order Text", Fix="*"
We have modified the Purchase Order form to print one of the condition types maintained for calculating the tax. Other than this there is no change to the plants that are already live.
I could not locate any "Purchase Organization" / "Company Code" / "Plant specific configuration.
Am I missing any configuration or where can I look in what is causing this error.
Request help from the experts in the forum.
with Regards,
Dhandapani RThere is no company/purchasing/plant specific customizing for purchase order text.
The customizing copying rules for the "Texts for Purchase Orders" affects all equally .
If the text in the purchase order in ME23N is already filled different to other plants, then you either have a modification in place, or the texts are differently maintained in the referenced data (vendor, material, info record, contract) -
Dear All,
I awant to add purchase order field in T-Code F-40. Following is Scenario.
Transaction to be processed : Outgoing Payment
PstKy : 29 (Special G/L Debit)
Account : (vendor Account)
SGL IND : J
uner more data also it is not showing. I have also used T-Code OB41 but still it is not showing PO field in first screen.
DineshHi,
Following are the steps i have gone through.
1. T-Code OBXT to search G/L Account, then i gone through the combination AcctypeSGL Ind (KJ). Then Chart of Accounts. Then i Listed all G/L which are in used.
2. T-Code FS00, Field Status Group.
3. T-code : OBC4, Then Field Status Group(which is in use of G/L Account) and marked purchase order field as required field under (material management/purchase order)
Still it is not showing purchase order field in first screen of F-40.
Dinesh -
'How to restrict change in Quantity/Price in saved Purchase Order in SAP B1'
Dear All,
How can I restrict a user from changing Quantity or Price in a saved Purchase Order in SAP B1 8.81 PL 0?
Regards.Try This TN SP
If @object_type='22' and @transaction_type='U'
BEGIN
If Exists (SELECT T0.docnum FROM [dbo].[OPOR] T0
INNER JOIN [dbo].[POR1] T1 ON T1.DOCENTRY = T0.docENTRY
WHERE T0.DOCENTRY = @list_of_cols_val_tab_del)
BEGIN
Select @error = -1,
@error_message = 'Update not possible'
End
End
Regards
Kennedy -
How to creat deadlock for the purchase order in SAP Workflow
How to creat deadlock for the purchase order in SAP Workflow
Hi Ben,
Are you using FM "CONVERT_DATE_TO_EXTERNAL" before passing delivery date? If not, use FM like this, before passing the date to BAPI_PO_CREATE1 and it might work
DATA: vf_doc_date(10),
internal_date TYPE d.
vf_doc_date = sy-datum. "Document date.
internal_date = vf_doc_date.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = internal_date
IMPORTING
date_external = vf_doc_date
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
Regards,
Vivek -
Want a TN to block to ADD Purchase order Canditions Are as follows:-
Respective Experts,
I want a TN to block ADD Purchase Order Conditions are as follows:-
When I add Purchase order it goes for approval and the document is saves as Draft
Now 1) If there is 6 Purchase orders for a Vendor are pending for approval no one more Purchase Order is Added in the system.
It will block to user to add Purchase order.
2) It should block to user to Add that Purchase order And That PO is not go for Approval means block to ADD Purchase order before Documnet go to approval....
Please help me to make TN for above conditions ??
Regards,
SandeshHi Sandesh..
Try This
Create this view as PO
SELECT count(t1.docentry) as Count,cardcode
FROM odrf t1
INNER JOIN drf1 t2 ON t1.docentry = t2.docentry and t2.ObjType='22' where t1.docstatus='O'
group by cardcode
Use this tnsp for the block
IF @object_type = '112'
AND @transaction_type IN ('A', 'u')
BEGIN
IF EXISTS(
SELECT t1.docentry
FROM odrf t1
INNER JOIN drf1 t2
ON t1.docentry = t2.docentry and t2.ObjType='22'
inner join PO t3 on t3.cardcode=t1.CardCode
WHERE @list_of_cols_val_tab_del = t1.docentry and t3.count>'6'
BEGIN
SET @error = -1
SET @error_message ='You Cannot Perfrom this Action pending purchase order'
END
END
Hope Helpful
Regards
Kennedy -
SDK-DI - Add purchase order based on sales order through DI-API
Today it is only possible to add a purchase order based on a sales order though the UI. This option should also be supported in the DI-API.
hi,
try removing the double quotes for basetype, baseline, baseentry.
if it doesn't solve the problem
make sure that you are assigning the docentry only but not the docnum of the sales order to the purchase order lines' baseentry.
rgds,laks. -
EDI IDOC OUTBOUND send Purchase Orders from sap to vendors
Hi Experts,
I am new to EDI IDOCS, but i got object on this. So my requirement is purchase orders are send to vendors from sap (OUTBOUND) through EDI-850 format. and also i have to add some more fields to standard idoc type ORDERS05, one more condition is if vendor type is not EDI, then the POs should send through fax, email, how can we solve this condition.
So plaese send some sample code on this object.
Thanks in advance,
S ReddyHi ,
You can send the purchase order to the vendors using different outytpes configurations in NACE transaction .
If you define a particular output type where you need to give medium 6 and define partner functions within this you can also set condition which partner needs to recieve EDI output and which one FAX or email all this will be done by Functional expert.
For adding extra segments to your basic type ORDERS05 you need to extend the idoc you can do it via WE30 and WE31 .Link you message type to basic type and extension . Please follow below tcodes for further help . Create all the requested steps in the tcodes mentioned below.
we20:patner profile
we21:port
we30:idoc creation
we30:segment creation
we81:message type
we82:link message with idoc type.
we02:to status of idocs.
Now you need to write code for filling those extra segments you have added to you extension type. For that you need to check where your new segment is placed in Idoc structure . There will be a exit avaliable to attach your code to fill those segments .
Please go through previous SDN links to see more info.
One the settings are done in the NACE , issue output from PO transction and once your output is processed check your Idoc in WE02 to see if the segments are coming with the desired data.
Regards
Vikas -
Purchase Order External Send with email body text
hi guru,
i saw lot of threads but i didn't get coreect answer
i did below process
Goto NACE .
u2022 Select EF and click on OUTPUT TYPES.
u2022 Then select Output Type NEU and click on processing routines .
u2022 In that you have to add a new entry - medium 5 .
u2022 Then you need to assign a program, form routine and form.
u2022 You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
u2022 Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
u2022 For subject of the mail goto Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
u2022 Under General data -> Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE .
u2022 Now the subject will be PO No. 1800004202.
u2022 You need to maintain your email id in tcode SU01 and also the vendor's email id.
u2022 Now while creating a new purchase order , change the medium to External Send .
u2022 Then goto Communication Method and select CS01 . ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
u2022 Goto tcode ME9F .
u2022 Execute.
u2022 Select the checkbox and click on Output Message.
u2022 You will get a message MAII 00000000000001 generated .
u2022 Use note no 191470
mail subject is going ,but mail text is not coming.
some people suggest this sap note
Note 786847 - E-mail purchase order w/ e-mail text and several attachments
i did not get this note.
give the solution for email body text ,i read some thread,it will solve through abap development .
please give solution
regards
vijayHi
1. GO to tcode SCOT.
2. Double click on SMTP
3. Click on the set button next to internet
4. In this screen for SAP Script/ Forms select TXT.
Regards
Girish
Edited by: Girish Bettaiah on Aug 8, 2011 3:11 PM -
Purchase order release strategy with multiple characteristics
Hi All,
We have Purchase order release strategy based on the following characteristics:
Total Net Order Value
Purchasing Organization
Release strategy Type
a few other custom fields
We would like to have PO's with release strategy based on a particular Material Group [say X]. I have created a new Characteristic with respect to CEKKO-MATKL and added this characteristic to the same class.
I have created a new release code [HR] [we need a different person to sign off] and a new release strategy [TR] for which I have assigned the release code HR. In this release strategy, I have set it to get activated for a particular Material Group that does seem to work, but the remaining PO's are not getting triggered for other material groups. For other release strategies, I have left the material group field blank, because they need to be triggered for any material groups except X.
Could you please let me know if I am missing something or is there an alternate approach to this ?
Thank you,
SatishHi,
Obviously system will not trigger release strategy in ur case since in the classification data for other strategies u have left it blank excepting X for one strategy.
Since u have added a new characteristic Material group and assigned it to class then system expects an input for Material group for triggering release tab.If this is left blank then system by default will not trigger release strategy tab.
Solution:
First add all existing material groups in values tab of mat group characteristic then maintain the required set of material groups except X in other strategies in classification data.
Hope this is clear to you.
Regards,
Uzair -
Purchase Order Print out with Digital Signature
Dear Gurus,
1) we are going to implement release strategy, but still business requirement to have a digital signature, Meaning, if only upto Supervisor release, then PO print should come with Supervisor digital signature, if PR value upto Supervisor & manager release, then PO print should come with Manager digital signature, if PR value upto Supervisor, Manager, GM Reelease, then PO print should come with GM digital signature, Whoever approves last, then their signature should appear in the PO printout - How to Achieve this?
2) If any amement in the Purchase order, then is it possible to reflect in the PO print out as Rev1 , Rev 2...?
Please advice
Thanks
RSDear,
Check : http://help.sap.com/saphelp_nw70/helpdata/EN/18/ecb69017ad4765855425b97f666470/content.htm
May be helpful.
Another is scan the signature to bmp and attach the bmp through smartform or sapscript - But this is not digital signature.
Regards,
Syed Hussain.
Maybe you are looking for
-
Accessing Distributed destination JNDI Names Web
I am using WebLogic Full Client with Weblogic 10.3. I would like to obtain the JNDI names of the physical members of a Distributed Destination. Weblogic Documentation recommends doing: "you must look up the JNDI name or the member name using the webl
-
Questions: SAP Procurement terminology
Need clarifications regarding below SAP terms with respect to Procurement. What is meant by Standard Product Classifications and what's the use of this in procurement? What is meant by Master categories and what is the use of Master categories? Is th
-
Netweaver 2004s ABAP Sneak Preview
Hello Folks, I am getting the following error on trying to install the ABAP Sneakpreview: ABAP: ERROR 2006-08-18 07:27:38 MOS-01185 The subkey 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\EraserUtilRebootDrv' does not exist on the 'localhos
-
I plan to download premiere elements 10 for Mac. I am currently running a project in elements 9. 1. Can I complete my project in 9 or will there be a conflict with 10 sitting there? 2. Does 10 for Mac have chroma key now? 3. I have read about install
-
Loss tracks in my iPod app on iPhone when moving to iCloud
Some of my tracks not transferred from iPod to iCloud