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

pass work area to subroutine.

i have to pass wa_msg TYPE bal_s_msg to a subroutine Add_message.

perform Add_message using wa_msg.

form Add_message using lwa_msg type bal_s_msg .

will values of wa_msg will pass.

plz reply

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Aug 02, 2006 at 04:56 PM

    Of course.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 04:58 PM

    you can use USING or CHANGING in the form definition.

    <b>form Add_message using p_wa type bal_s_msg .</b>

    you can use P_WA in this form.

    endform.

    regards

    srikanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 05:01 PM

    Hi,

    I would suggest you to go through the below link,

    http://help.sap.com/saphelp_47x200/helpdata/en/9f/db984635c111d1829f0000e829fbfe/content.htm

    Regards,

    Azaz Ali.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 07:17 PM

    Hi ,

    Just Try this code(copy & paste)

    PERFORM LOG_CREATE.
    PERFORM ADD_MESSAGE USING WA_MESSAGE.
    FORM LOG_CREATE.
    
      DATA: WL_LOG  TYPE BAL_S_LOG.      "Log header
    
    * Delete the old log handle if already created
      IF NOT W_LOG_HANDLE IS INITIAL.
        CALL FUNCTION 'BAL_LOG_DELETE'
             EXPORTING
                  I_LOG_HANDLE  = W_LOG_HANDLE
             EXCEPTIONS
                  LOG_NOT_FOUND = 0
                  OTHERS        = 0.
        IF SY-SUBRC <> 0.
        ENDIF.
      ENDIF.
    
    
    * Create log and get handle
      CALL FUNCTION 'BAL_LOG_CREATE'
           EXPORTING
                I_S_LOG      = WL_LOG
           IMPORTING
                E_LOG_HANDLE = W_LOG_HANDLE
           EXCEPTIONS
                OTHERS       = 2.
      IF SY-SUBRC <> 0.
      ENDIF.
    
    ENDFORM.                    " LOG_CREATE
    
    FORM ADD_MESSAGE USING PWA_MESSAGE type BAL_S_MSG.
    
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
           EXPORTING
                i_log_handle        = W_log_handle
                i_s_msg             = PWA_MESSAGE.
    
    ENDFORM.
    
    

    Regards,

    Raghav

    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.