Application Development 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: 

Create new screen in BADI when creating a new transport request

former_member355261
Participant
0 Kudos

Hi all,

I implemented the method CHECK_BEFORE_CREATION in the badi CTS_REQUEST_CHECK to control the transport request description entered and show error message and cancel the creation if the description doesn't meet some requirements.

Now I want to create another screen for the description in order to help users enter the description by putting fields with search helps ...

So, I want to know how to achieve this and what is the best solution to do it.

Thanks in advance.

8 REPLIES 8

raymond_giuseppi
Active Contributor
0 Kudos

Did you notice that CHECK_BEFORE_CREATION has changing parameters for long text and attributes, so in your check, before raising the error message you could display your customer screen and change those parameter values, then raise error only if user doesn't correct his input?

Regards,

Raymond

0 Kudos

The problem is that I can't display the screen, it's not possible to call it from within a method implementation.

0 Kudos

Just create a small function group with a FM and a dynpro and call it from method, same signature than the BAdI method. In the FM call the dynpro.

Regards,

Raymond

0 Kudos

Ok that seems correct. thanks for the answer.

But what do you mean by 'same signature than the BADI method' ?

0 Kudos

same parameters

0 Kudos

You mean in the FM ? Because I'm just going to create a screen and call it in the FM, and then call the FM from the method if the description is incorrect. So, my FM wouldn't have any parameters, right ?

0 Kudos

I was suggesting to pass same parameters to the FM as received by the method.

*"  IMPORTING
*"     REFERENCE(TRFUNCTION) TYPE  TRFUNCTION
*"  CHANGING
*"     REFERENCE(TEXT) TYPE  AS4TEXT
*"     REFERENCE(ATTRIBUTES) TYPE  SCTS_ATTRS
*"----------------------------------------------------------------------
  * some code
   CALL SCREEN 0100.
* some code
  ENDFUNCTION.

(Note parameter name TYPE not allowed in FM so I renamed)

Regards,

Raymond

0 Kudos

That was really helpfull, thanks a lot.