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

Function module for creating an entry in NAST table for generating an idoc

Former Member
0 Likes
9,509

Hi experts,

Is there any function module so that i can create an entry in NAST table which will trigger an idoc.

Regards

Sridevi S

Hi experts,

Is there any function module so that i can create an entry in NAST table which will trigger an idoc.

Regards

Sridevi S

14 REPLIES 14
Read only

Former Member
0 Likes
6,128

if you do proper configuration in NACE then entry can be visible in NAST after output is attached to the particular transaction instance.

Regds,

Read only

0 Likes
6,128

hi Suresh,

I want to force the entry in one program. how to do this.

regards

Sridevi S

Read only

0 Likes
6,128

NAST_SAVE_OBJECT - give a try.

check program RSNASTSO - You have set it through NACE and then use this program

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
6,128

Inserting entries to NAST directly ... This must not be done

Read only

0 Likes
6,128

then what method need to be followed to send an output type idoc from a program??

Read only

0 Likes
6,128

output types will be assinged to transactional data and Idoc will be triggered automatically when output type is assigned.

I am not clear about your requriement.

Read only

0 Likes
6,128

hi suresh,

i am getting an inbound idoc. Whenever the receipt is getting posted by this inbound idoc i need to trigger an output type idoc orders05 from the user exit of this inbound idoc. how to acheive this?

Regards

Sridevi S

Read only

0 Likes
6,128

this may help you

link:[Processing of output types through program|http://wiki.sdn.sap.com/wiki/display/ABAP/ProcessOutputtypesthroughprogram]

Read only

0 Likes
6,128

Hi,

Which receipt transaction you are referring to ? Instead of triggering the IDOC through user exit, you should configure output type (NACE) in this transaction which will trigger ORDERS05 whenever inbound idoc is processed successfully.

Regards

Vinod

Read only

0 Likes
6,128

Hi Vinod,

Can you tell me the steps of how to configure this.when wmmbxy inbound idoc is posted successfully i need to trigger orders05 idoc.

Regards

Sridevi S

Read only

0 Likes
6,128

Hi,

Ask your functional consultant to configure the message control settings using transaction code NACE. If standard Output type is not available then you have to create one with NACE and assign the process code of ORDERS05 to this.

Read the SDN Blog [Message Control (Output Control) for ALE|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6074] [original link is broken] [original link is broken] [original link is broken]; for reference.

Regards

Vinod

Read only

0 Likes
6,128

when wmmbxy inbound idoc is posted successfully i need to trigger orders05 idoc

and again ORDERS05 is inbound and Order should be created Goods received in wmmbxy Idoc.

As suggested by Vinod try look for user-exit which will be triggered at the end of wmmbxy processing FM and write code to create Inbound order Idoc using IDOC_INBOUND_ASYNC ..

if no sutiable exit found then copy the processing FM for wmmbxy.

No need of NAST entries for Inbound orders as well.

at the same time if you requirement is to trigger outbound order idoc no standard process FM is available, need to go for custom process.

Regds,

Read only

diptimay_mishra
Explorer
6,128

Use FM RV_MESSAGE_UPDATE_SINGLE to insert or Update an entry in NAST table

Read only

Kartehiik
Explorer
0 Likes
5,106

* Data Declaration
DATA: ls_nast TYPE nast,
lv_msg_doc TYPE char50,
lv_vbeln TYPE vbeln_vl.
* Constants
CONSTANTS: lc_v2 TYPE char2 VALUE 'V2',
lc_nacha TYPE char1 VALUE '6',
lc_vsztp TYPE char1 VALUE '4',
lc_zld2 TYPE char4 VALUE 'ZLD2',
lc_01 TYPE na_anzal VALUE '01',
lc_vstat TYPE na_vstat VALUE '1',
lc_msid TYPE sy-msgid VALUE 'E0',
lc_msgno TYPE sy-msgno VALUE '045'.
* Clear
CLEAR: ls_nast, lv_msg_doc, lv_vbeln.
* Logic to update NAST for all deliveries
LOOP AT p_li_docid INTO DATA(ls_docid).
lv_vbeln = ls_docid-docno+25(10).
lv_msg_doc = lv_docnum.
CALL FUNCTION 'NAST_PROTOCOL_INITIALIZE'.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = lc_msid
msg_nr = lc_msgno
msg_ty = lc_s
msg_v1 = lv_msg_doc.
CALL FUNCTION 'NAST_PROTOCOL_STORE' ##FM_SUBRC_OK
IMPORTING
msg_cmfpnr = ls_nast-cmfpnr
EXCEPTIONS
no_protocol_update = 1
OTHERS = 2.
ls_nast-spras = sy-langu.
ls_nast-anzal = lc_01.
ls_nast-vstat = lc_vstat. "'1'.
ls_nast-usnam = sy-uname.
ls_nast-kappl = lc_v2.
ls_nast-objky = lv_vbeln.
ls_nast-kschl = lc_zld2.
ls_nast-parnr = p_ls_cust-kunnr.
ls_nast-parvw = lc_we.
ls_nast-erdat = sy-datum.
ls_nast-eruhr = sy-uzeit.
ls_nast-nacha = lc_nacha.
ls_nast-vsztp = lc_vsztp.
ls_nast-manue = abap_true.
ls_nast-datvr = sy-datum.
ls_nast-uhrvr = sy-uzeit.

CALL FUNCTION 'RV_MESSAGE_UPDATE_SINGLE'
EXPORTING
msg_nast = ls_nast.

CLEAR: ls_docid, ls_nast.
ENDLOOP.