cancel
Showing results for 
Search instead for 
Did you mean: 

Call Transaction CJ20n and jump on specific Milestone

abapdanny
Explorer
0 Kudos
351

Hi guys,

I would like to call the Transaction CJ20n (via ABAP), skip first screen and jump directly on a specific Milestone. Any ideas how to develop that?

Thank you in advance!

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor

Yes but AFAIK CJ20N only reads 3 parameters from memory for 'easy call'

 

    GET PARAMETER ID 'PSP' FIELD entry_data-pronr.
    GET PARAMETER ID 'PRO' FIELD entry_data-pspnr.
    GET PARAMETER ID 'ANR' FIELD entry_data-aufnr.

 

But it also read some data from shared bufer,

 

  IMPORT entry_data
         g_fcode
         g_template_object
         FROM SHARED BUFFER cnpb_indx(ed) ID sy-uname.

 

Try to export some data in this shared buffer before calling the transaction. (variables defined in top include of function group CNPB_M) - the transaction will read and delete the shared buffer.

NB: The buffer contains an instance of structure CNPB_TEMPLATE_OBJECT and a function code

So 

  • Analyze the initial PBO of the transaction
  • Perform some where used search on the information you get
abapdanny
Explorer
Thank you for your help! I think I did what you proposed. I copied Coding of Include LPSIS_SINGLE01F85 in my coding. In Include LPSIS_SINGLE01F86 I deleted Line 25 -> p_view_stack-vsnmr = <version>. because of course I couldnt feed the Field Symbol. After doing that, the SHARED BUFFER was correct and now it works 😉

Answers (1)

Answers (1)

abapdanny
Explorer
0 Kudos

Hi @Sandra_Rossi 

thank you for your reply. No, I didn't try it over BatchInput. I wanted to do it via the ABAP Statement 'Call Transaction CJ20n'. But there I can only give WBS Elements as Input but not Milestones etc.