cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order (BUS2032) access to table VBAK

Former Member
0 Kudos

Dear Experts,

I would like to send an email (SMTP) notification, when a Sales Order has changed.

I would like to include some fields from VBAK table. They are developed fields, starting with Y*.

I managed to add the table VBAK to the Container.

In the BUS2032 CHANGED event I bind the

&_EVT_OBJECT& -> &SALESORDERBUS2032&

&_EVT_OBJECT& -> &_EVT_OBJECT&

Now I have access to the standard Sales Order properties and Items.

How can I bind the VBAK table?

Thank you,

Imre

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There is no need to bind the same container two times.

&_EVT_OBJECT& -> &SALESORDERBUS2032&

&_EVT_OBJECT& -> &_EVT_OBJECT&

&SALESORDERBUS2032& or &_EVT_OBJECT& will be enough. But the data type of theose container should be BUS2032.

You have to do this binding as well.

&_EVT_CREATOR& --> &_WF_INITIATOR&

Then create a send mail step type in workflow, and in the body of the send mail there is a button called 'Insert Expression'.

Click the button and select the containers from the pop up.

If you want to insert the sales order number in the mail, then selectthe below container.

&BUS2032.SALESDOCUMENT&.

Thanks,

Viji.

Former Member
0 Kudos

Hi Viji,

Sorry I failed the CtrlC CtrlV operation...

The right binding on the

Event-Workflow

&_EVT_CREATOR& -> &_WF_INITIATOR&

&_EVT_OBJECT& -> &SALESORDERBUS2032&

I can include the

&SALESORDERBUS2032.ORDERINGPARTY.CUSTOMERNO&

and

&SALESORDERBUS2032.LASTCHANGEDBY.NAME&

But, there is not data from

&SALESORDERTABLE.Y_SD_CHT&

Container Element:

SalesOrderTable

ABAP Dict. Data Type = VBAK

Parameter Settings : Import

Could you give me idea how can I access the VBAK-Y_SD_CHT field data?

Thank You!

Imre

former_member193382
Active Contributor
0 Kudos

Hi,

First check if the value is populated in the table for the corresponding sales order.

I'll suggest, you create an attribute for this field so that as soon as the sales order BO is instantiated, you can find the value populated in the attribute which you can access in the workflow.

Regards,

Raj

Former Member
0 Kudos

Hi Imre,

In the SWO1 have you checked your business object with the test data?

is your attribute Y_SD_CHT is populated correctly?

First check whether the attribute is pospulated correctly or not..

Its a attribute of the business object and you have to write the code to fill this attribute.

Thanks,

Viji.

Former Member
0 Kudos

Hi Viji,

You are right!

My plan is to create a subType of the BUS2032, which includes the developed fields.

So I hope I will be able to get access to the developed fields from Send Email step from Workflow.

Only one question.

Is there any way to fetch data from a different table/object other then the trigering event ?

I would like to write in the email the name of the Customer, not only the ID.

Like in Excel VLOOKUP function?

BR,

Imre

Former Member
0 Kudos

Hi Imre,

Yes it is possible to get the data's from other business object's as well.

For that you have to add the business object as the attribute of the current business object.

In the same way you can get the other table data's as well.

Please check the other attributes of BO BUS2032 and follow the same logic.

Thanks,

Viji.

Answers (0)