cancel
Showing results for 
Search instead for 
Did you mean: 

Output type in delivery

0 Kudos

Hello,

I have a requirement for creating delivery output (header):-

1. No one should be able to reprint the delivery after the PGI is done.( i tried to assign my own requirement to the output type but cannot prevent the user from entering the output type manually in the sales order), can we prevent the user from manually entering the output type in teh delivery document.

2. only one user should be allowed to reprint the delivery note.

Warm Regards

Aadesh

View Entire Topic
bsivasankarreddy_reddy
Active Contributor
0 Kudos

hi

when you maintain the print for two , one all ready printed , so you do the settings print out only once , so when you try to second time print it sows all ready printed ,

in my process i have maintain the some  z table for the printing program  , once printing is done the data will store this table , after i want next print i delete the store data , after printing allowed ,

like below logic

FORM check_print_status  USING func    TYPE any

                         CHANGING flag TYPE any.

  DATA: zmessage LIKE zmessages,

          wa_flag  TYPE c ,

          wa_srgrp LIKE j_1irg23d-srgrp,

          wa_depexnum LIKE j_1irg23d-depexnum.

  zmessage-mandt = sy-mandt.

  zmessage-datum = sy-datum.

  READ TABLE t_vbrp1 INDEX 1.

  IF sy-subrc = 0.

    SELECT SINGLE srgrp depexnum INTO (wa_srgrp, wa_depexnum) FROM

j_1irg23d                                                   "#EC *

     WHERE vbeln = t_vbrp1-vgbel

       AND werks = wrk_werks .

    zmessage-exnum = wa_depexnum .

    zmessage-werks = wrk_werks.

    zmessage-srgrp = wa_srgrp .

  ENDIF.

  zmessage-uname = sy-uname .

  zmessage-uzeit = sy-uzeit .

  zmessage-type  = 'J1IJ' .

  zmessage-desc1 = 'Depo Excise Invoice' .

  CALL FUNCTION 'Z_MESSAGE_INSERT'

    EXPORTING

      func          = func

    IMPORTING

      flag          = wa_flag

    CHANGING

      zmessage      = zmessage

    EXCEPTIONS

      no_data_found = 1

      OTHERS        = 2.

  IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

  ENDIF.

  flag = wa_flag .