Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help Needed for Notification Create(IW51)

Former Member
0 Likes
1,510

Hello All,

i want to create notification(IW51) while creating delivery(VL01N)..

For that use program SAPMV51A and inside that i'm changing MV50AFZ1.

but problem is that i cant find-out the serial number and Material Number.

please see the program that i'm using and help me, what to pass in I_BAPI2080_NOTHDRI-SERIALNO and I_BAPI2080_NOTHDRI-MATERIAL.

My Program is like:

DATA: I_BAPI2080_NOTHDRI TYPE STANDARD TABLE OF BAPI2080_NOTHDRI WITH

HEADER LINE.

DATA: I_BAPI2080_NOTHDRE TYPE STANDARD TABLE OF BAPI2080_NOTHDRE WITH

HEADER LINE.

DATA: I_BAPIRET2 TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.

  • create header data

I_BAPI2080_NOTHDRI-SERIALNO = 'XXXXXXXXXX'.

I_BAPI2080_NOTHDRI-MATERIAL = 'XXXXXXXXXX.

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

NOTIF_TYPE = 'S0'

NOTIFHEADER = I_BAPI2080_NOTHDRI

  • TASK_DETERMINATION = ' '

  • SENDER =

  • ORDERID =

IMPORTING

NOTIFHEADER_EXPORT = I_BAPI2080_NOTHDRE

TABLES

  • NOTITEM =

  • NOTIFCAUS =

  • NOTIFACTV =

  • NOTIFTASK =

  • NOTIFPARTNR =

  • LONGTEXTS = I_BAPI2080_NOTFULLTXTI

  • KEY_RELATIONSHIPS =

RETURN = I_BAPIRET2.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

NUMBER = I_BAPI2080_NOTHDRE-NOTIF_NO

  • IMPORTING

  • NOTIFHEADER =

  • TABLES

  • RETURN =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

<Priority removed from subject lines>

Edited by: The Kaushik on Sep 5, 2011 11:24 AM

Edited by: Vinod Kumar on Sep 5, 2011 1:33 PM

Hello All,

i want to create notification(IW51) while creating delivery(VL01N)..

For that use program SAPMV51A and inside that i'm changing MV50AFZ1.

but problem is that i cant find-out the serial number and Material Number.

please see the program that i'm using and help me, what to pass in I_BAPI2080_NOTHDRI-SERIALNO and I_BAPI2080_NOTHDRI-MATERIAL.

My Program is like:

DATA: I_BAPI2080_NOTHDRI TYPE STANDARD TABLE OF BAPI2080_NOTHDRI WITH

HEADER LINE.

DATA: I_BAPI2080_NOTHDRE TYPE STANDARD TABLE OF BAPI2080_NOTHDRE WITH

HEADER LINE.

DATA: I_BAPIRET2 TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.

  • create header data

I_BAPI2080_NOTHDRI-SERIALNO = 'XXXXXXXXXX'.

I_BAPI2080_NOTHDRI-MATERIAL = 'XXXXXXXXXX.

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

NOTIF_TYPE = 'S0'

NOTIFHEADER = I_BAPI2080_NOTHDRI

  • TASK_DETERMINATION = ' '

  • SENDER =

  • ORDERID =

IMPORTING

NOTIFHEADER_EXPORT = I_BAPI2080_NOTHDRE

TABLES

  • NOTITEM =

  • NOTIFCAUS =

  • NOTIFACTV =

  • NOTIFTASK =

  • NOTIFPARTNR =

  • LONGTEXTS = I_BAPI2080_NOTFULLTXTI

  • KEY_RELATIONSHIPS =

RETURN = I_BAPIRET2.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

NUMBER = I_BAPI2080_NOTHDRE-NOTIF_NO

  • IMPORTING

  • NOTIFHEADER =

  • TABLES

  • RETURN =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

<Priority removed from subject lines>

Edited by: The Kaushik on Sep 5, 2011 11:24 AM

Edited by: Vinod Kumar on Sep 5, 2011 1:33 PM

6 REPLIES 6
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,344

Hi Kaushik,

Just like when you create manually how you will pass the data pass the same way.

Regards,

Madhu.

Read only

0 Likes
1,344

Hi madhurao

actually when i create delivery from vl01n, at that time material number will be displayed in ITEM tab.

but i'm not able to findout the source, that from where to fetch that material number in program SAPMV50A.

and i want that material number to create NOTIFICATION.

can u please help me on that.

with warm regards,

Kaushik Savaliya

Read only

0 Likes
1,344

HI,

I have one question .program sampmv50a is fr vl01 t create delivery but you are asking how to get delivery details. Explain your business requirement.Check this FM SD_DELIVERY_ITEMS_RECEIVE.

Regards,

Madhu.

Read only

0 Likes
1,344

Hi madhurao,

business req. : we dont want to create 'notification'(IW51) separately for that i want to use function module that create notification in background.

tcode VL01N is for create outbound delivery with order reference.

and i want to create 'notification' in same transaction.

so that i can use SAPMV50A and in that i hv use include MV50AFZ1.

and in this include, i can write my code inside FORM USEREXIT_SAVE_DOCUMENT..

and for that i can use function module.

in function module , i need to pass serial number and material in notifheader.

but i'm not able to fetch that data from program SAPMV50A.

can u please help me on that.

i have already post my code that i used.

with warm regards

Kaushik Savaliya

Read only

Former Member
0 Likes
1,344

Solved by Me...

Read only

0 Likes
1,344

Hi kaushik,

it is good.

Regards,

Madhu.