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

How to write driver program JIT Schedule Adobe form program.

mdmanjarejaz
Explorer
0 Kudos
222

Hi All!

I've been trying to develop an adobe form and it's been an issue from multiple weeks. Anyone here can help me figure out where I am going wrong.

Requirement : Develop custom Adobe form for JIT Schedule. The form should be appearing in ME9E when JIT job is run in ME38. Post that form should be sent as email attachment post MRP run/ME84.

What's done:

1. Created custom FORM, INTERFACE & Driver Program.

2. Configured NACE with Program Name, Routine - ENTRY_LPJE_AUTO (same as standard), FORM and type PDF.

Problem : When we run JIT Schedule in ME38 (edit > Generate JIT Schedule..

1. First we encountered dump CX_SY_DYN_CALL_PARAM_MISSING in Standard program SAPLV61B in Include LV61BF0N in Perform nnast_aende_check in below mentioned line.

* Routine für Änderungsnachricht vorhanden -> ausführen
          PERFORM (p_arout) IN PROGRAM (p_aprog).

To fix this we removed the USING parameters from our custom program's routine call entry_lpje_auto (below)

*FORM entry_lpje_auto USING pv_returncode pv_us_screen. "commented this it was ent_retco and ent_screen.

FORM entry_lpje_auto.

This is standard code for reference Standard code SAPFM06P Include FM06PE02

FORM entry_lpje_auto USING ent_retco ent_screen.

  DATA: lf_retcode TYPE sy-subrc,
        l_druvo    LIKE t166k-druvo.

  l_druvo = 'A'.
  CALL FUNCTION 'ISAUTO_ESCR_PRINT_FRC_JIT'
    EXPORTING
      ix_nast          = nast
      ix_tnapr         = tnapr
      ix_screen        = ent_screen
      ix_toa_dara      = toa_dara                             "520228
      ix_arc_params    = arc_params                           "520228
    IMPORTING
      EX_RETCODE       = lf_retcode
    CHANGING
      ix_druvo         = l_druvo.

  IF lf_retcode NE 0.
    ent_retco = 1.
  ELSE.
    ent_retco = 0.
  ENDIF.

ENDFORM.

2. To fix this we fix above dump we removed the parameters which brought us to the next error that was TABLE NAST was empty

To fix above we went to the standard code SAPLV61B and checked that NAST was empty but XNAST was populated my adding Include messdata. After this program procceds further.

3. Function FP_JOB_OPEN gets triggered and output device (LP01) is being asked here. Problem (3) is this shouldn't be asked. How to make it run without the popup and pre-configured. 

4. From is being displayed, after that email is being sent directly without ME84 (code has bcs class sending email) and then we are being sent to ME38 and where we click save and when we exit the transaction, me get a message that "Update was cancelled" and runtime error is there in ST22 in Program RSNAST00 with exception CX_SY_DYN_CALL_PARAM_NOT_FOUND error PERFORM_TOO_MANY_PARAMETERS.

  944
  945     perform (tnapr-ronam) in program (tnapr-pgnam) using returncode
  946                                                          us_screen
  947                                                          if found.
  948 * restore original NAST record (in case TNAPR-RONAM changed something)
>>>>>     nast = temp_nast.
  950 * return code unchanged: program didn't behave properly

When trying to debug this if placed a breakpoint, that breakpoint is not being triggered. Help would be deeply appreciated!

1 REPLY 1
Read only

mdmanjarejaz
Explorer
151

If anyone stumbles from same problem the issue was the form was configured twice. Once in NACE output type pdf and once in program sequence in output details in top left of NACE outputs.