'Function'에 해당되는 글 11건
- 2009.08.12 RP_CALC_DATE_IN_INTERVAL 일/월/년 더하고 빼기 1
- 2009.04.23 CURRENCY_CONVERTING_FACTOR
- 2009.03.02 펑션 - POPUP_TO_DECIDE
- 2009.03.01 LFA1 에서 한건 읽어오는 펑션
- 2009.03.01 MAKT 에서 한건 읽어오는 펑션
- 2009.03.01 MARC 에서 한건 읽어오는 펑션
- 2009.02.26 RP_LAST_DAY_OF_MONTHS - the last day of a month 3
- 2009.02.23 Problem with BAPI_PO_CREATE1 - Rounding
- 2009.02.18 RFC parameters (pass by value)
- 2009.02.14 Company 에 해당하는 All Plant 가져오는 펑션
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = LR_DATUM-HIGH
DAYS = '0'
MONTHS = '1'
SIGNUM = '-'
YEARS = '0'
IMPORTING
CALC_DATE = LR_DATUM-LOW.
perform netpr_convert_by_waers using gt_itab-zstk_amt
gt_itab-zin_amt
gt_itab-zout_amt
gt_itab-hwaer
changing l_zstk_amt3
l_zin_amt3
l_zout_amt3.
*&---------------------------------------------------------------------*
*& Form NETPR_CONVERT_BY_WAERS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form netpr_convert_by_waers using p_stk p_in
p_out p_waers
changing p_stk3
p_in3
p_out3 .
data: l_factor type p decimals 3.
clear: l_factor .
call function 'CURRENCY_CONVERTING_FACTOR'
exporting
currency = p_waers
importing
factor = l_factor
exceptions
too_many_decimals = 1
others = 2.
p_stk3 = p_stk * l_factor .
p_in3 = p_in * l_factor .
p_out3 = p_out * l_factor .
endform. " NETPR_CONVERT_BY_WAERS
report zrcykim115.
data: l_answer.
*----------------------------------------------------------------------*
start-of-selection.
*----------------------------------------------------------------------*
call function 'POPUP_TO_DECIDE'
exporting
textline1 = 'Table logging is not currently active'
textline2 = 'in your system.'
textline3 = 'Do you want to analyze the logs anyway?'
text_option1 = 'Yes'
text_option2 = 'No'
titel = 'Evaluation of change logs'
cancel_display = ' '
IMPORTING
answer = l_answer.
*----------------------------------------------------------------------*
end-of-selection.
*----------------------------------------------------------------------*
if l_answer eq 1.
message s303(me) with 'Yes'.
else.
message s303(me) with 'No'.
endif.
CALL FUNCTION 'LFA1_SINGLE_READ'
EXPORTING
lfa1_lifnr = gt_raw-lifnr
IMPORTING
wlfa1 = ls_lfa1
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'MAKT_SINGLE_READ'
EXPORTING
matnr = gt_raw-matnr
spras = sy-langu
IMPORTING
wmakt = ls_makt
EXCEPTIONS
wrong_call = 1
not_found = 2
OTHERS = 3.
CALL FUNCTION 'MARC_SINGLE_READ'
EXPORTING
matnr = gt_raw-matnr
werks = pa_werks
IMPORTING
wmarc = ls_marc
EXCEPTIONS
lock_on_marc = 1
lock_system_error = 2
wrong_call = 3
not_found = 4
OTHERS = 5.
concatenate so_month-low '01' into s_budat-low.
if so_month-high eq c_000000.
l_idate = s_budat-low.
else.
concatenate so_month-high '01' into l_idate.
endif.
call function 'RP_LAST_DAY_OF_MONTHS'
exporting
day_in = l_idate
importing
last_day_of_month = s_budat-high
exceptions
day_in_no_date = 1
others = 2.
또는...
CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
EXPORTING
I_DATE = LR_DATUM2-LOW
IMPORTING
E_DATE = LR_DATUM2-HIGH.
Hi to all,
I have some problem with this Bapi.
I want to force the quantity in each item but during the creation the system applies the rounding rules. I have put BAPIMEPOITEM-NO_ROUNDING = 'X' (I dont' know if it's the correct field...) but nothing happened....
I have also a problem wtih the delivery date....I 'm forcing the value BAPIMEPOSCHEDULE-DELIVERY_DATE without result.
TABLES
return = bapi_return
poitem = bapi_poitem
poitemx = bapi_poitemx
Fill poitemx table to with flags ie.
BAPIMEPOITEMX-NO_ROUNDING = 'X' .
About two questions:
What do you mean with rounding rules? Can you put here one real example?
Are you using the X structures in the BAPI?
Example for the delivery date:
l_schedule-po_item = '00001'.
l_schedulex-po_item = '00001'.
l_schedulex-po_itemx = 'X'.
l_schedule-delivery_date = '20050621'.
l_schedulex-delivery_date = 'X'.
APPEND l_schedule TO lt_schedule.
APPEND l_schedulex TO lt_schedulex.
This is working for me.
Hi Rui,
yes, I'm using the X structures.
For rounding rules I mean this:
I'm putting:
bapimepoitem-quantity = quantity.
bapimepoitemx-quantity = 'X'.
bapimepoitem-no_rounding = 'X'.
bapimepoitemx-no_rounding = 'X'.
And the same quantity in bapimeposchedule.
For example if in MM03 or ME13 there is a fixed quantity of 100 and I put 1 in bapimepoitem-quantity, my po is created with the value 100.
How can avoid this?
For the delivery date I'm filling the fields like you, but also in this case the po is created with different delivery dates for each items.
I'm using bapimepoitem-no_rounding = 'X' and also
bapimepoitemx-no_rounding = 'X' but it seems not working.
You can see my reply to Rui.
we always have to check 'pass value' for parameters(we get a syntax unless), but what value will be passed to the input parameters of the rfc,are they initial values based on type?
and do we still have to give reference when it doesn't make sense in a network?(or once the call is made from an outside system )
More F1 Help...
There are two types of parameter passing: pass by reference and pass by value.
Pass by reference shows the formal parameter directly on the actual parameter so that changes to the formal parameter immediately affect the actual parameter.
Pass by value creates the formal parameter either as a copy of the actual parameter when the function module is called (at IMPORTING value and CHANGING value parameters) or creates it initially on the stack (at EXPORTING value parameters). At CHANGING value and EXPORTING value parameters the formal parameter is copied onto the actual parameter when it returns from the function module call.
CALL FUNCTION 'PLANTS_SELECT_FOR_BUKRS'
EXPORTING
BUKRS = L_BUKRS
TABLES
PLANTS = LT_PLANT
EXCEPTIONS
BUKRS_NOT_FOUND = 1
OTHERS = 2.