cancel
Showing results for 
Search instead for 
Did you mean: 

PO Release with reason for Rejection comments with pop up

former_member201532
Participant
0 Kudos

Hi,

my reqiurement is to  get PO release when PO changed .

1. i copied standard workflow WS20000075.

2. when user reject release of PO then we need to dispaly popup screen to get  rejected reason comments .

how to get that pop up screen ? will it automatically dispaly popup scren when user reject PO release in ME29 ? .

   or

do we need to do any development ?

from previous forms i came to know we can use 1. CATSXT_SIMPLE_TEXT_EDITOR

                                                                                    or

                                                                      2. POPUP_GET_VALUES

but i need to display popup when user click reject button of PO release .is it possible using  function modules.

please tell where we have to use these function module and how to use that function module.

please help me..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

if you want to show the pop up when the rejection button is pressed in me29n, you need to implement a badi ME_CHECK_ALL_ITEMS and write the below code in the method.

data: lt_cmnt type catsxt_longtext_itab.

  if sy-ucomm eq 'MEREJECT'

    and im_x_ekko-procstat eq 8.

    do." make the rejection text mandatory

      call function 'CATSXT_SIMPLE_TEXT_EDITOR'

        exporting

          im_title              = 'ENTER COMMENT'

*   IM_DISPLAY_MODE       = ' '

*   IM_START_COLUMN       = 10

*   IM_START_ROW          = 10

        changing

          ch_text               = lt_cmnt

                .

      if lt_cmnt is not initial.

        exit.

      endif.

    enddo.

  endif.

table lt_cmnt contains your comment and you may save it as standard text and use it in your wf step .

Answers (6)

Answers (6)

former_member201532
Participant
0 Kudos

Hi,

my requirement is same as in bellow link.

but in that they didnt explain how they get popup for rejection and where they are capturing that reason for rejection.

Former Member
0 Kudos

I developed similar kind of WF.

I used FM CATSXT_SIMPLE_TEXT_EDITOR to provide pop-up to user and capture the rejection text which returns it in an internal table.


Activity step for PO reject release as shown above uses a custom method of BO BUS2012.It calls the FM CATSXT_SIMPLE_TEXT_EDITOR first in order to provide pop-up and then it calls the BAPI_PO_CHANGE to reject the release with the rejection text,in order to update the rejection text in appropriate place.(We were updating at PO header text)


Ideally you need to capture the user/agent who ever is executing the user decision step..and clicking on the reject button ,then pass it WF container and then to pass it to below container of the task level


So that pop-up will come to the same user who ever is rejecting the decision WI, and it will happen online without any gap.

There are all other things in the WF log which were specific to our requirement.Check if the rejection part above here fits to your requirement.

Regards

Ansumesh

former_member201532
Participant
0 Kudos

Hi Anusumesh,

can you please provide code for FM CATSXT_SIMPLE_TEXT_EDITOR

and  how to make rejection reason manditory.

i am using standard template WS20000075  for po release

former_member227140
Active Participant
0 Kudos

Hi ,

Can you not create a Business object of your own and one method to it , which will contain the code i said above and then in your workflow the place where user is approving or rejecting a po after that step you can include the task which will call our method and business object.

can you put a screen shot of your workflow in SWDD????

there must be a step in wf which is releasing /rejecting a PO?? is it not???

former_member201532
Participant
0 Kudos

Hi,

i am not using user decision step or UWL.

i am copied standard workflow WS20000075  for PO release and it will call automatically call ME29N for release or reject PO .

When user click on reject for release of PO in ME29 then pop up should appear for reason for rejection and it is manditory.

please help me

former_member185167
Active Contributor
0 Kudos

Hello,

"i am not using user decision step or UWL."

I see, so you want a pop-up to appear in ME29 when someone rejects a PO there?

Unfortunately, that is not a Workflow question. Maybe they know at the ABAP forum.

Or, you could change the workflow to do the reject for you and not take the user to ME29.

regards

Rick Bakker

former_member185167
Active Contributor
0 Kudos

Hello,

If you're using UWL then this is something you can just turn on.

Use the UWL Decision with Note option.

regards

Rick Bakker

former_member201532
Participant
0 Kudos

Hi Abhijeet,

please tell what is the use of bellow code.

data :IS_CONTEXT TYPE PIQNOTES_CONTEXT_KEY,

lt_line TYPE TABLE OF piqnote_line,

lt_tlines TYPE piqnote_tline_t,

ls_tline TYPE tline.

ls_tline-tdline = wa-value.

when these pop up will appear after user click on reject on po release or after completion .

please answer .

former_member227140
Active Participant
0 Kudos

Create a method for business object , create a task and include this method.

please add this step after user decision step , so after user click approve or reject a pop will be displayed wherein user can enter reason for approval/rejection.

please remove this text and check

data :IS_CONTEXT TYPE PIQNOTES_CONTEXT_KEY,

lt_line TYPE TABLE OF piqnote_line,

lt_tlines TYPE piqnote_tline_t,

ls_tline TYPE tline.

ls_tline-tdline = wa-value.

..i have done it before few years so dont remember exactly but it must work as we have achieved results with this

former_member227140
Active Participant
0 Kudos

create a method which will give you a pop-up in which you can enter some description........

below i am giving you the code.....which will give you a pop-up once you will execute it....

in the workitem  use the functionalty "METHODS"...

CODE BELOW

data : lv_title type text132,

lt_sval type standard table of sval,

wa like sval.

wa-tabname = 'TLINE'.

wa-fieldname = 'TDLINE'.

wa-FIELDTEXT = 'Note'.

wa-FIELD_ATTR = '00'.

append wa to lt_sval.

lv_title = 'Reason for Approval of Document Entry'.

call function 'POPUP_GET_VALUES'

exporting

popup_title = lv_title

tables

fields = lt_sval.

clear wa.

read table lt_sval into wa index 1.

data :IS_CONTEXT TYPE PIQNOTES_CONTEXT_KEY,

lt_line TYPE TABLE OF piqnote_line,

lt_tlines TYPE piqnote_tline_t,

ls_tline TYPE tline.

ls_tline-tdline = wa-value.

Thanks,

Abhijeet Shastri.