Skip to Content
author's profile photo Former Member
Former Member

Rejection reasons pop-up - Urgent help please .

Hello ,

I need your help to replace the popup in code below instead i want to use the user decision reject option/button , and how can get the text in the popup

to show it in the mail that will be sent to the initiator :

Ive added the code using a method in my BO the popup is showing with text box ..

---------------------------------------------------------------------------------------------------------------------------------------------------------

Select Dialog, Synchronous, Result Paraments

In tab Result type: table SWF_IFAPPR and field: SWF_APPRES

DATA: L_ANSWER LIKE SY-INPUT.

DATA: APPROVE LIKE SWF_IFAPPR-SWF_APPRES.

data : text type CATSXT_LONGTEXT_ITAB ,
title type SYTITLE ,
l_text(72) .
data : v_text(1000) .

CALL FUNCTION 'POPUP_TO_DECIDE'
EXPORTING
TEXTLINE1 = 'Notification Approval?'(001)
TEXT_OPTION1 = 'Approved'(002)
TEXT_OPTION2 = 'Rejected'(003)
TITEL = 'Please provide your Comments also'(004)
IMPORTING
ANSWER = L_ANSWER
EXCEPTIONS
OTHERS = 1.


CASE L_ANSWER.
WHEN '1'.
APPROVE = 0.

WHEN '2'.
APPROVE = 4.

title = 'Reason for Rejection' .

CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
EXPORTING
IM_TITLE = title
IM_START_COLUMN = 20

IM_START_ROW = 20
CHANGING
CH_TEXT = text .

if text is not initial.
rej1text = text.
endif.


WHEN 'A'.
EXIT_CANCELLED.
ENDCASE.


* set result parameter
SWC_SET_ELEMENT CONTAINER RESULT APPROVE.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2012 at 10:11 AM

    dear,

    I can't understand problem please explain me again.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nora,

      Please check multiline.Rejection reason more than one line.

      Use like this.In all declaration part(Task method and workflow container)

      Approver releasing the order in transaction or user decision ?

      Normally If PO release strategy config, after all release from all approvers then only PO get release.(Default behaviour)

      Regards,

      Ragav

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2012 at 09:45 AM

    thanks all foe your help ... and sorry again for any inconvenience

    this the code in method :


    data : text1 type CATSXT_LONGTEXT_ITAB ,

    title type SYTITLE ,

    text type Catsxt-1st_ltext_line

    data wa_text like line of text1 .

    Title = 'Reason for Rejection' .

    CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDI

    EXPORTING

    IM_TITLE = title

    IM_START_COLUMN = 20

    IM_START_ROW = 20

    CHANGING

    CH_TEXT = text1 .

    read table text1 into wa_text index 1 .

    move wa_text to text .

    SWC_GET_ELEMENT CONTAINER RESULT text .

    END_METHOD.

    in the WF the container (import multiline) :


    the bindling in the activity step :

    i get this dump :

    What happened?

    Error in the ABAP Application Program

    The current ABAP program "CL_SWF_EXP_SERVICE============CP" had to be

    terminated because it has

    come across a statement that unfortunately cannot be executed.

    Error analysis

    You attempted to assign a field to a typed field symbol,

    but the field does not have the required type.

    Trigger Location of Runtime Error

    Program CL_SWF_EXP_SERVICE============CP

    Include CL_SWF_EXP_SERVICE============CM002

    Row 110

    Module type (METHOD)

    Module Name ELEMENT_GET_ATTRIBUTES



    1.jpg (61.7 kB)
    3.jpg (55.9 kB)
    4.jpg (148.8 kB)
    2.jpg (81.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      text type CATSXT_LONGTEXT_ITAB occurs 0,

      Inside method,

      Define 'text' field like tis

      If you are not getting,Please debug and find.

      Then check binding.

      Finally reject one scenario then check the variable is updated or not using workflow log.

      Thanks,

      Ragav

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2012 at 12:42 PM

    can you send me your logic pls

    i think i need to use both

    SWC_SET_TABLE and SWC_GET_TABLE

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2012 at 01:34 PM

    ITS WORKING ๐Ÿ˜€

    OMG T_T finally

    Thank you all for your help

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 14, 2014 at 08:31 AM

    Hi,

    I have the same requirement.

    Am getting the pop-up to give the rejection reason.

    But, When
    the โ€œcancelโ€ icon is selected, with or without text, the user should be returned
    to the workflow task.

    How can i do this.

    Am using FM 'CATSXT_SIMPLE_TEXT_EDITOR'.

    Please advice.


    popup.jpg (22.7 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.