Skip to Content
0
Former Member
Jun 04, 2009 at 04:18 PM

Passing values to FM

53 Views

Hi Experts,

I have written the following code to assign partner2 to Partner1. But no result. Is there anything missing?

REPORT  ZCREATE_REL.

TABLES : BUT050 .

DATA: part1 TYPE but050-partner1,
      part2 TYPE but050-partner2.

DATA:
        BEGIN OF itab,
            part1 TYPE but050-partner1,
            part2 TYPE but050-partner2,
   END OF itab.

*Internal Table
DATA: i_itab TYPE TABLE OF itab WITH HEADER LINE.


*Workarea.
DATA: w_itab TYPE itab.

SELECTION-SCREEN BEGIN OF BLOCK blk18 WITH FRAME TITLE text-001.

SELECT-OPTIONS:
  s_part1 FOR part1 ,
  s_part2 FOR part2 .
SELECTION-SCREEN END OF BLOCK blk18.

Loop at i_itab into w_itab.

CALL FUNCTION 'BUPR_RELATIONSHIP_CREATE'
EXPORTING
iv_partner_1 = 'part1'
iv_partner_2 = 'part2'
iv_relationship = 'BUR011'
*iv_date_from = '00010101'
*iv_date_to = '99991231'
iv_testrun = ' '
iv_x_save = 'X'.
*TABLES
*et_return = gt_return.

*PERFORM disp_error USING gs_warning.
*COMMIT WORK AND WAIT.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = 'X'.
* IMPORTING
*   RETURN        =
          .
endloop.

Thanks

Ajay