on 07-14-2008 7:56 PM
Hi Experts.
Anybody know why when I use the BBP_DOC_CHANGE_BADI it run 3 times after I click the buttom "Check" or "Publish" in a Bid Invitation.
Im trying to change the structure ET_LONGTEXT. In the first time it run correctly but in the others it doesn't.
Im filtering by FLT_VAL and SY-UCOMM:
IF flt_val = 'BUS2200'.
IF sy-ucomm EQ 'PARK' OR
sy-ucomm EQ 'PUBL'.
Could anybody help me, please?
Victor
Hi,
The BADI "BBP_DOC_CHNAGE_BADI" is called in all the 3 modes,i.e. CREATE,CHANGE,DISPLAY.
But you can always add the condition based on the SY-UCOMM i.e. action taken in the BADI,and then the logic in the badi will be processed only for that action.
BR,
Disha.
Do reward points for useful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When do you want the logic written in the BADI to be processed?When you click on the button PUBLISH or HELD??Acc you can write the condition for SY-UCOMM.
Can you explain what do you mean by BADI is not running properly second time?What are you trying to accomplish through the BADI,If possible pls paste the code here for further analysis.
BR,
Disha.
Do reward points for useful answers.
I want to include one text in the Documents(Internal Note) of Bid Invitation when I hold or publish a Bid Invitation.
IF flt_val = 'BUS2200'.
IF sy-ucomm EQ 'PARK' OR
sy-ucomm EQ 'PUBL'.
DATA: v_flag TYPE c,
wa_longtext TYPE bbp_pds_longtext,
wa_longtext2 TYPE bbp_pds_longtext,
wa_header TYPE bbp_pds_bid_header_d,
v_cont TYPE i.
DO.
IF v_flag = 'x'.
EXIT.
ENDIF.
ENDDO.
CLEAR: wa_longtext,
wa_longtext2,
v_cont.
DESCRIBE TABLE et_longtext LINES v_cont.
wa_longtext2-tdid = 'HTXT'.
wa_longtext2-tdspras = sy-langu.
wa_longtext2-counter = v_cont.
Rescue the number of the Bid Invitation
CALL FUNCTION 'BBP_PD_BID_GETDETAIL'
EXPORTING
i_guid = is_header-guid
IMPORTING
e_header = wa_header.
CONCATENATE text-001 wa_header-object_id INTO wa_longtext2-tdline SEPARATED BY space.
IF v_cont = 0.
APPEND wa_longtext2 TO et_longtext.
ELSE.
LOOP AT et_longtext INTO wa_longtext.
IF wa_longtext-tdline(33) = text-001.
EXIT.
ELSE.
IF sy-tabix LT v_cont.
CONTINUE.
ELSE.
IF wa_longtext-tdline = space.
MODIFY et_longtext INDEX sy-tabix FROM wa_longtext2.
ELSE.
APPEND wa_longtext2 TO et_longtext.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
Thank You
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.