cancel
Showing results for 
Search instead for 
Did you mean: 

WAE02-New Button

Former Member
0 Kudos

Hi,

I need to add new button (Near button "Create Purchase Order") in transaction WEA02. Ther is no screen exit and BADI found for the same.

Could you please let me know how can i do it?

Accepted Solutions (1)

Accepted Solutions (1)

JuanCarlosDelga
Contributor
0 Kudos

Hi Sachin

In disposal processing there are 2 types of button:

- Application functions

- Functions

First you must define these 'Specify Application Functions' and 'Specify functions'

and the assign functions or applications functions to the corresponding document category,

'Specify document categories'.

If you need a functionality that isn't supported by the standard, you will have to create your own function, remember that the signature of the function is fixed.

Regards.

JCD

Former Member
0 Kudos

Hi JCD,

thanks for you reply.

But can i enhance the screen and put my own button on the screen with above mentioned reply?

actually i want to create one "Create Sales order " button near the button "Create Purchase order" (file attached)?

JuanCarlosDelga
Contributor
0 Kudos

Hi Sachin,

You can create all the buttons that you need, the buttons are defined in customizing, if you want to create a button to create a sales order take function EHSWA_141_WASTEMVT_CRT_MM_PO in function group EHSWA_141 as a reference, your function must have the same signature.

The sales order must be also considered as a follow-on document

A follow-on document is a document linked qith the entry document.

In your case create the follow-on document for the sales order, then you must create first and Application fuction, later assign this application function to the Document category.

Regards.

JCD

Former Member
0 Kudos

Hi JCD,

Thanks For your reply.

I am able to add Button "Create Sales Order" on the toolbar.

Now do we have Function to create Sales order as we have for Create Purchase order (EHSWA_141_WASTEMVT_CRT_MM_PO)?

If not then how can we achieve this by taking reference of FM EHSWA_141_WASTEMVT_CRT_MM_PO As the PO and SO are different process?

What are the changes that i need to do for creating an sales order in FM EHSWA_141_WASTEMVT_CRT_MM_PO ?

Thanks in Advance.

Sachin Gupta

JuanCarlosDelga
Contributor
0 Kudos

Hi Sachin,

From function EHSWA_141_WASTEMVT_CRT_MM_PO you can take the error handing, this function calls function EHSWA_112_PO_CREATE_V1, and this calls the bapi BAPI_PO_CREATE.

In your case you must call function BAPI_SALESORDER_CREATEFROMDAT2, extract all the info that you need form entry document, waste partners, assigment, contract from disposal channel,...

Regards

JCD


Former Member
0 Kudos

Thanks JCD.

I have debugged the PO creation order. what i found is that ther is one FM  'EHSWA_112_DATA_FOR_PO'  used which fetches all the header, item, schedule and account information of PO. So do we have any FM same for Sales order that will fetch all the SO details(header,item and schedule).

Or do we have any other approach to get all the details for creating SO?

Thanks in Advance

Sachin Gupta

JuanCarlosDelga
Contributor
0 Kudos

Hi Sachin,

Waste Management is ready to work only with purchase order, not with sales order neither with purchase requisition (I did it this case in the past).

Regards

JCD

Answers (0)