BaDi's for attaching documentation to sales orders
Hi All,
I'm trying to set up an interface which can raise a credit memo request in SD and automatically attach some documentation through the attachments list.
Can you please advise if there are any BaDi's around attaching documentation to the sales order in VA01 / VA02 / VA03?
Many thanks
Phil.
Hi Philip,
take a look to this document, maybe you can find something that could help you.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3&overridelayout=true
Regards.
Andrea
Similar Messages
-
User exits/BAdIs for Forecast consumption by sales order
Hello Experts,
My question here is: When Sales Order either new or change comes from ECC to APO, what are key fields considered for Forecast Consumption? Is requirements strategy is considered from location product master or Sales Order brings own data from ECC into it's own structure? I have read from SAP help or documentation that Sales Order coming from ECC does not use requirement strategy from Product Master. Rather it get its own fields like planning strategy/group / requirement class from ECC. It uses location product master only to get consumption parameters like forward/back word consumption days. So I am thinking to use some user exits or BAdIs to enhance the incoming sales orders to consume separate forecast categories in APO.
My requirement is:
For the same one product we want sales orders (can have two different order types or identify by a custom field) to consume two different order categories (ie. FA & FC) by enhancing incoming sales orders. So we have regular 1)Forecast key figure which is 'FA' category and 2)Forecast Additional key figure which is FC category. When we release two separate forecasts from DP we release into these two key figures and categories. Now we want incomping sales orders to consume these two categories separately when our sales orders are having two different order types (i.e OR and ZR).
I want to kow what way we can acomplish this? Are there any user exits or BAdIs for this purpose?
I looked arount BAdI /SAPAPO/DM_BADI_CSP and I am not quite sure it's going to help. Are there any others?
I appreciate if anybody explain me the process?
Thanks in advance!
RajStandard Logic --- Whatever plant is visible in the Sales Order, the sales order will appear under that Product Location in SNP
There is no standard way of making the sales order visible in another location.
Depending on your requirement(Ex: Forecast Consumption, planning etc),using APO-BW we can simulate the requirements in the other plant which can be a nightly run and not immediate.
Now coming to your question, if the delivering plant is A, how does ECC Delivery document know when the sales order has plant B that the delivering plant is A.
Can you be more specific.
THanks
Kumar -
I need a Badi that is triggered when saving Sales order in both Va01 and Va
Hi
I need a Badi that is triggered when saving Sales order in both Va01 and Va02
I tried with the following BADI's
BADI : BADI_SD_SALES
Implementation : /BEV1/SR_SALES_ORD_1
Method SAVE_DOCUMENT
Now when i want to put my peice of code in this (SAVE_DOCUMENT) method.
It is asking for Access key. Which i do not have.
Should i create a implementation and then create a method and then put my code there?
Anybody plz help.You will probably not find a BADI to suit your needs. However if you look at include program MV45AFZZ you should find two subroutines: USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT. You can put the code you need directly into these subroutines. If these have not been changed yet on your system, you will need an access key to make these changes.
Please read the documentation in the header of the subroutines for furtner information on when they are called.
Best Regards,
Chris H. -
Problem with attaching file to Sales Order
Hello,
In my company we have the possibility to attach files to sales orders, e.g. pdf files with the printing details.
These files are added by the GUI user, this works fine.
Now we have an extra order creation stream in which a pdf file has to be added to the SO without user interaction.
I found a helpful link ( /people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background )
This program creates URL links with no problem, but the file generation is not implemented yet.
I tried to add the file functions to his sample report but still have one problem. The file is uploaded, but not reported as a PDF file in sap. If I select the created attachment SAP allows only the saving of the attachment. After saving the created file is a good PDF file, it opens with PDF-viewers.
Why does SAP not know this is a PDF file and report it as such (and open the pdf viewer when selected).
Thanks, Frank.
source-code:
REPORT zzfb_brc .
* Report Z_RMTIWARI_ATTACH_DOC_TO_BO
* Written By : Ram Manohar Tiwari
* Function : We need to maintain links between Business Object and
* the attachment.Attachment document is basiclally a
* business object of type 'MESSAGE'.In order to maintain
* links, first the attachment will be crated as Business
* Object of type 'MESSAGE' using Message.Create method.
* Need to check if we can also use FM
* 'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
* than using Message.Create method.
* I took this program and removed all the parts for adding URL's and
* notes.
* Include for BO macros
INCLUDE : <cntn01>.
* Load class.
CLASS cl_binary_relation DEFINITION LOAD.
CLASS cl_obl_object DEFINITION LOAD.
PARAMETERS:
* Object_a
p_botype LIKE obl_s_pbor-typeid DEFAULT 'BUS2032', "SO
p_bo_id LIKE obl_s_pbor-instid DEFAULT '0000757830', "example number
* Object_b
p_docty LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
p_msgtyp LIKE sofm-doctp DEFAULT 'EXT' NO-DISPLAY,
* Relationship
p_reltyp LIKE mdoblrel-reltype DEFAULT 'ATTA'.
TYPES: BEGIN OF ty_message_key,
foltp TYPE so_fol_tp,
folyr TYPE so_fol_yr,
folno TYPE so_fol_no,
doctp TYPE so_doc_tp,
docyr TYPE so_doc_yr,
docno TYPE so_doc_no,
fortp TYPE so_for_tp,
foryr TYPE so_for_yr,
forno TYPE so_for_no,
END OF ty_message_key.
DATA : lv_message_key TYPE ty_message_key.
DATA : lo_message TYPE swc_object.
DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line,
ls_doc_content TYPE soli-line.
* Create an initial instance of BO 'MESSAGE' - to call the
* instance-independent method 'Create'.
swc_create_object lo_message 'MESSAGE' lv_message_key.
* Upload the pdf file, for now from the frontend, in the future from
* the server.
DATA:
* dsn(40) TYPE C VALUE '/usr/sap/trans/convert/1.pdf', "server location
l_lines TYPE i. "filelenght
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'c:t1.pdf'
filetype = 'BIN'
IMPORTING
filelength = l_lines
TABLES
data_tab = lt_doc_content.
* no exceptions, the file is there in this example
break brouwersf.
** the coding for the server input, for later
*OPEN DATASET dsn FOR INPUT IN BINARY MODE.
*IF sy-subrc <> 0.
* EXIT.
*ENDIF.
*READ DATASET dsn INTO ls_doc_content.
*WHILE sy-subrc EQ 0.
* APPEND ls_doc_content TO lt_doc_content.
* READ DATASET dsn INTO ls_doc_content.
*ENDWHILE.
*CLEAR ls_doc_content.
*CLOSE DATASET dsn.
* define container to pass the parameter values to the method call
* in next step.
swc_container lt_message_container.
* Populate container with parameters for method
swc_set_element lt_message_container 'DOCUMENTTITLE' 'Title'.
swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
swc_set_element lt_message_container 'NO_DIALOG' 'X'.
swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
swc_set_element lt_message_container 'DocumentSize' l_lines.
swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
swc_call_method lo_message 'CREATE' lt_message_container.
* Refresh to get the reference of create 'MESSAGE' object for attachment
swc_refresh_object lo_message.
* Get Key of new object
swc_get_object_key lo_message lv_message_key.
* Now we have attachment as a business object instance. We can now
* attach it to our main business object instance.
* Create main BO object_a
DATA: lo_is_object_a TYPE sibflporb.
lo_is_object_a-instid = p_bo_id.
lo_is_object_a-typeid = p_botype.
lo_is_object_a-catid = 'BO'.
* Create attachment BO object_b
DATA: lo_is_object_b TYPE sibflporb.
lo_is_object_b-instid = lv_message_key.
lo_is_object_b-typeid = p_docty.
lo_is_object_b-catid = 'BO'.
*TRY.
CALL METHOD cl_binary_relation=>create_link
EXPORTING
is_object_a = lo_is_object_a
is_object_b = lo_is_object_b
ip_reltype = p_reltyp.
* Check if everything OK...who cares!!
COMMIT WORK.Hi,
Welcome to the SDN Forums!!!
You need to supply the PC file extension in the container element 'DOCUMENTTYPE'.
swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
In your case change the above statement as below:
swc_set_element lt_message_container 'DOCUMENTTYPE' 'pdf'.
<b>OR</b> change the default value of p_msgtyp to 'PDF'.
Cheers,
Ramki Maley.
Please reward points if the answer is helpful.
For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
Message was edited by: Ramki Maley -
Services for Object button in Sales Order
Hello Experts,
We are not getting Services for Object Button in Sales Orders. Actually we need to attach some documents to Sales Orders.
Thanks in advance.
Mamta.Dear Friend,
If you are not getting Services for Object Icon in Sales Document, then follow this:
T-code - SU01 u2013 Here Enter User ID & click in change icon.
Then click on Parameters Tab & Add Parameter u2013 SD_SWU_ACTIVE. .
This will definitely solve your problem...
Thanks,
Jignesh mehta -
User exits for route determination in Sales order & Deliver creation
Hi Gurus,
I need to do some change in the route determination for both sales order & Delivery creation.
Can anyone suggest me which user exit I have to use.
Appropriate answers will be awarded.Hi,
You can use the following exit for route determination - EXIT_SAPL0VRF_001.
The FM documentation is below. Check the functionality:
"The customer exit can be used for customer-specific route determination or to modify the inbound data for the company's own route determination.
The following data is transferred to support customer-specific route determination:
I_VBAK current order header (for route determination in sales order)
I_VBKD order business data (for route determination in sales order)
I_VBAP current order item (for route determination in sales order)
I_VBPA current sales partner
I_LIKP current delivery header (for route determination in delivery)
The following data can be modified and transferred back to the standard route determination or used for a specific route determination:
C_ALAND Country of departure
C_AZONE Departure zone
C_LLAND Destination country
C_LZONE Receiving zone
C_VSBED Shipping condition
C_TRAGR Transportation group
C_GRULG Weight group
C_FLAG_GEN_VT Flag: Route determination with generic shipping
requirements/transportation group.
C_FLAG_INCR_GRULG Flag: Increase weight group if no route
If you want to use a standard route determination with different parameters, trigger the exception 'CONTINUE_WITH_STANDARD'.
In the log table C_PROT, the log data from the customer-specific route determination can be transferred back. In this case, the log entries always refer to customer-specific messages. To add a message to the log table, the function module SD_ROUTE_DET_LOG can be used (see below).
If a route is determined in the customer-specific route-determination, it can be transferred back in the E_ROUTE field. If no route was found, the exception 'NO_ROUTE_FOUND' is to be triggered."
Thanks. -
Free finish goods for certain level of sales order amount.
Hi Gurus,
I want to add some free finish goods if the sales order amount is greather than a certain amount for OR sales order type
For example : if the sales order net amount is greather than 1000 - I want to automaticaly add a FG - 347234FG .
Is it possible without having SAP retail module ?Khaled is right for details refer to sap help page:
http://help.sap.com/saphelp_46c/helpdata/en/dd/55fa68545a11d1a7020000e829fd11/frameset.htm
Good luck! -
Pricing For Text Item in Sales Order
Hi ,
How to give price for text item in sales order.
With regards.
AfzalHi Afzal,
consider to create a single service material as a generic one, type DIEN, with basic data and sales org views, with item category group LEIS (it will determine item category TAX in sales order). Material description could be "Don't forget to change me!" so in sales order user remembers to changes the description according to the especific sales order requirements.
Regards,
JM -
!!!How to restrict user for making changes in Sales order , partner level
Hi all,
Can anybody tell me how to restrict user for making changes in Sales order at partner level, is it through user exit?Hi Ruchi
I hope u had gone to the screen fields which u want them not to be editable. So there u select all the fields contents which u do not want to to be changed and check the boxes with W.content and Display and save it. Once evrything is done u have to activate the particular transcation going in to the standard variants and put the name and click the activate button.
Hope its clear
Reward if help ful
Sri -
COGS determination for Free of cost sales order
Hi All,
We have an issue regarding the COGS determination for Free of cost sales order. We created a free of cost sales order. But i need to know whether this sales order items will hit to COGS or not? If so how do i check whetehr its has been charged to COGS or not? and we have an issue raised saying thst one material in this sales order has not being charged to COGS. So please help me to solve this issue. Ihave checked the account assignment in GBB-VAX. And is there anyting to do with the settlement profile for COGS determination?.
Thanks and regards
UdayHi,
During PGI a material document and accounting doc gets created which would hit COGS account.
You're talking about one specific sales order in which for one material it didn't hit COGS account or any order you're creating now with that material has an issue? If its a specific material which has an issue always..then something is wrong with that material master setup. Also you can go to the reported Sales order--doc flow to the PGI document and check the accounting doc and if its not posted..check the analysis why its not posted?
And if its one off then I would suggest 2 options:
1) Reverse the goods movement, cancel the delivery or if billing has already been done..cancel the billing as well. And re-do the cycle. This always ensures correct posting.--> Recommended option.
2) Manual adjustment in FI.
And settlement profile is Controlling concept..not sure you would get any help on this in this forum.
Regards
RS -
LSMW for open notifications,open sales order & open service order
Hi Gurus,
Can anyone please tell me how to go about writing LSMW's for open notifications,open sales order & open service order.
This is for service processing in CS ,where has the scenario is
Create Notification (IW51) --> create Sales Order(Multiple Line Items) ( VA02) --> Create Service Order ( IW32)
Service order is automatically (Item Proposal) generated w.r.t Sales Order (multiple line items)
How to I do the recording for transactions in such a scenario.
Please suggest!
Thanks!
Vinodyou can use the below LSMW IDOC method
SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
SERVICENOTIFICATION_CREATEFROM Create service notification
SERVICE_CREATE Creation of a Service Master Record
CARNOT Delivery: Shipping notification
DESADT Shipping notification
DESADV Delivery: Shipping notification
INOTIF Notifications
INTUPD Notification Status Update
ISU_ADVICE IS-U Deregulation: Notification
ISU_CHANGE_REQUEST IS-U: Notification of Change to
ISU_MAINT_SO IS-U Dereg.: Notification of Dev
ISU_REMITTANCE_ADVICE Transfer Notification -
Currently customer has some regulations in other countries that require they create a actual invoice for Internal Requisitions/ Internal Sales Orders.
Is there a way that these can be created automatically and emailed to specific users?
Thanks,
Ling.Pl post in the Financials forum - Financials
-
ADDDITIVE COST FOR PRODUCT COST BY SALES ORDER SCENARIO.
Dear friends,
We are using costing for sales order & we have maintained the costing variant under the path IMG> Controlling> Product Cost Controlling> cost object controlling> Product cost by sales order >premliminary costing & order based costing>product costing for sales order costing>Costing variant for Product costing >Check costing variant for product costing.
Under this we have maintained the Costing variant, Now we need to have Additive cost. But didnt found the tab in the costing variant where as when we check in T.code OKKN which is a part of Product cost planning we can find the Additive cost tab.
How to run addtive costing run for Product cost by sales order scenario & please guide me with one example.
Or else is there any configuration where we can assign standard costing variant PPC1 instead of Costing variant SOC1 ( which is a costing variant of Product cost by sales order.
Please guide me
regards,
SandeepHi Sandeep,
You may please try using Unit Costing for Sale Order.
It is over an above the sale order costing you have done. So in case you want to post any additional known cost, you may do the unit costing for the sale order after the sale order costing.
Trust this helps -
I want to give sales discounts only for the first five sales order
The scenario is that I have to limit the sales discount to first five sales order that is executed, from the 6th the system should not allow any sales discounts
Hi,
If I understand your requirement correclty you want to pass discount for a particular item for a customer only for the first five sales orders irrespective of the quantity you sell on this order. As I understand this way of limiting discount by way of the count of sales orders is not possible.
What is though possible is to limit the discount per customer or per article or per customer and article combination to either a certain fixed value of discount or limit the discount to certain fixed quantity sold for that article.
The config required is
Condition type : Scale basis -Either value scale or quantity scale. Scale type -leave this blank.
Condition record :Chose the scale type as "B- To Scale" and at the time of condition record creation you can define your own Calculation type -either fixed amount,percentage,quantity etc.
All the best.
Kartik Shah -
Lock characteristic value for configurable material in Sales Order
Is there a setting in SAP which can prevent user changing characteristic value for configurable material in Sales Order after production order created for this Sales Order? Currently, it can only works when first delivery create for this Sales Order.
Thanks a lot.Hi,,
in the characteristic goto additional data tab,
you have a field called not ready for input.
you select this when the value in this characteristic come by calculation based on the previous selection.
that field will be greyed out.
OR
u can even select the no display check box,
by selecting this u cant see the characteristic in the list,, it will give u a popup before leaving the screen.
for this the char has to be a required field.
OR
if any of this is not working then may be u can try out with authorization management.
thanks
Maybe you are looking for
-
Anyone know to get pdf page number with PDFBOX?
I have get page number but the page number display as code like this org.pdfbox.pdmodel.PDPage@113beb5how can convert "PDPage@113beb5" to the page number
-
How would I find out why a particular app, In-A-Visit, was removed from app Store?
-
Transfer data from Photoshop Elements 4
Hi, I am looking to transfer my catalog and collections intact from Adobe Photoshop Elements 4 on Windows XP to a newer version on Mac (yet to be purchased). Can anyone confirm if the catalogs and collections will export from version 4 and import suc
-
Hello experts I created a WD porject with all the RFC Models and I want to include this WD to another WD project to use RFC there. How can import the RFC models from the first project into a new one?? Thanks in advance
-
Internal error message on my iphone
Good evening everybody, I have a big problem on my iphone. Currently I saw two type of message on my screen : - in french translated in english "internal error : the internal temperature of your iphone get over the maximal temperature threshold, put