cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory parameter in Program variant

Ludo_Bebjak
Participant
0 Kudos

Hi,

I created a new Task Model, with the Type Job, I created a Variant, registered it, so all looks good in the Local Config for AFC. But when I try to schedule the Task/Job in AFC Processing Closing Tasks app, I get an error Task ZCA Lumber Report (9-1): Plant (GS_WERKS) is a mandatory parameter.

For Jobs where there is no mandatory selection parameter, all is fine, it works as expected.

Am I missing something in settings? Please, advise.

Thank you in advance for you reply.

Ludo Bebjak

Accepted Solutions (0)

Answers (3)

Answers (3)

jana_kasselmann
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ludovit,

Plant values are derived from the respective organizational folders of your closing structure in your task list template. Therefore, you need a folder of type "Plant" in you closing hierarchy below the company code folder and place the tasks which require a plant value inside that folder.

You can find further information and detailed steps on how to insert organizational unit folders in your template in the documentation on the SAP Help Portal:

https://help.sap.com/docs/AFC/b3f5b9cf1ab7498fad5b6f297013d65a/e9d6cc3fdb3a4f65859d59e07a79e867.html

Let me know if this works!

Best regards,

Jana

Ludo_Bebjak
Participant
0 Kudos

Hi Jana,

I don't have the error message anymore, so your suggestion seems to be working (I have another issue, so I couldn't finish it). But I thought that the Org Unit folders are for organizing the tasks only, not necessary for transferring values. What if some mandatory program selection fields are not Org Units? What if it's a File name, or a Date? I had another Task (type Job) with such mandatory fields, and it's still not working.

It looks to me that the issue is with mandatory fields in program screen variants.

Thank you for your suggestion, it will help me for the time being.

Regards,

Ludo

jana_kasselmann
Product and Topic Expert
Product and Topic Expert

Hello Ludo,

the parameters that job tasks require can be maintained either in the local settings of your connected system or in Advanced Financial Closing on folder level or task level.

You can find further information on parameter maintenance in the local settings here:

https://help.sap.com/docs/AFC/a32675ceb29149fd9be78a66704da190/57b543bb9fb841babd21bfa47454ceb1.html

And details on parameter maintenance in the task list template here:

https://help.sap.com/docs/AFC/b3f5b9cf1ab7498fad5b6f297013d65a/bd385689b637431ba7dad87600c42822.html

Kind regards,

Jana

Ludo_Bebjak
Participant
0 Kudos

Hi Michel,

thank you for your quick reply! Here are more details:

  • I am using a folder with Org Unit Type = Company Code
  • It's a custom ABAP Program, but one of the selection fields is Plant, and that field is mandatory.
  • In Local AFC Config > Register Programs for Parameter Mapping the parameter GS_WERKS for the program is mapped to Parameter Type WERKS, field Hidden unchecked.

I was just expecting that the value for Plant will be transferred from the Program variant which I created and registered.

Also, when I defined the same custom program as a GUI t-code Task Type G (Fiori), it worked fine: from AFC I was able to open the program and ran it... but it's not exactly what I need. I want the program to be scheduled as s batch job.

I tried different programs as Job types, and those with at least one mandatory selection field failed for the same reason.

I am looking forward to your reply!

Thanks and regards,

Ludo

michel_loehden
Advisor
Advisor
0 Kudos

Hi Ludovit,

thanks for reaching out.

In order to clarify this question I'd like to understand a few details:

  • Are you using a folder of an organization unit type "Plant" in or under which you created your task?
  • Can you provide us the ABAP program name, which you registered in your backend and which want to run with your Job Task in AFC?
  • How has the parameter GS_WERKS been mapped in your program registration?Thank you and best wishes,

Michel