cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BBP_PD_MSG_ADD issue in CHECK badi

Former Member
0 Likes
292

Hi all,,

SRM 5.0 ECS

I want to display an error message in the cofnirmation screen bit in the form op a POP UP !

I tried using the FM BBP_PD_MSG_ADD in the CHECK badi but it doesnt display the message in the pop up format!

The strange thing is that the pop up msg is being displayed in the search list screen before I click on CREATE CONFIRMATION button!

I want the pop up msg to be displayed after the user clicks on the next screen after user clicks on create confirmation button...

Please help as to where I am going wrong....

Here is my code:

IF flt_val = 'BUS2203'.
    IF sy-ucomm = 'BUTTON_CHECK'.

REFRESH et_messages.

      CALL FUNCTION 'BBP_PD_CONF_GETDETAIL'
        EXPORTING
          i_guid          = iv_doc_guid
          i_with_itemdata = 'X'
        IMPORTING
          e_header        = lt_conf_header
        TABLES
          e_item          = lt_conf_item.

      LOOP AT lt_conf_item INTO ls_conf_item.


*get the PO # and doc type
        lv_po = lt_conf_header-be_refobj+0(10).

        CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
          EXPORTING
            i_object_id = lv_po
          IMPORTING
            e_header    = lt_po_header.


        IF lt_po_header-process_type = 'ECV' .

CALL FUNCTION 'BBP_PD_MSG_ADD'
              EXPORTING
                i_msgty       = 'W'
                i_msgid       = 'BBP_SC'
                i_msgno       = '014'
                i_msgv1       = text-001
*            i_doc_guid    = iv_doc_guid
                i_field_name  = 'EXPRESS'
              EXCEPTIONS
                log_not_found = 1
                OTHERS        = 2.
EXIT.
ENDIF.
 ENDLOOP.
    ENDIF.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi,

Try to use the ET_MESSAGES and pass the message.

Make sure that you pass ITEM_GUID.

Chandu

Former Member
0 Likes

You mean instead of the FM BBP_PD_MSG_ADD directly add messges to ET_MESSAGES???I tried that and it displays the error message in line at the bottom of the screen as std error/warning messagesHowever my reqt is to display the warning message in a pop up.

Former Member
0 Likes

IF sy-ucomm = 'BUTTON_CHECK'.

Try change this statement to

if sy-tcode = <whatever tcode is when you click on CREATE CONFIRMATION> 

Former Member
0 Likes

Thanks Jay.

If I change the SY_UCOMM to that of "CREATE CONFIRMATION" button,custom message does get displayed in POP UP form,but then the next screen (which should be displayed after lcicking on CREATE CONFIRMATION button) is not dsplayed and controlstays on the same screen which is worse!

Please let me know if something wrongly written in my code or if SRM CONFIRMATION screen is designed in such a way that custom messages cannot be diplaye din form of pop up!