HOW TO USE BAPI IN FUNCTION MODULE
Hi All,
I am writing BDC for f-28 in that inbetween bdc i wanted to call a bapi and wated to display that to the endusr and ask user to select line iems from that and then proced the bdc further bsed on that selection
PL Sugeest me Somthing
Pts assured
Regards
Shashikant
So you are going to do BDC in foreground?
If so, which sounds a bit strange to me, but if that's the requirement, it be so. But when you are doing this in foreground anyway, then you can call the BAPI / And pop-up at 'any' point in time.
I really don't see any problem.
Similar Messages
-
How to use SWC_CREATE_OBJECT in Function Module
Hi All,
I need to create a one function module to fill the work flow container field. this work flow builder had only one task, that task is triggering through QM Action box. I need to maintain this function module in AM Action box, FM when saving field.
Please help me how to create a new function module in QM Acion box. When run the QM02 with usage decesion option is triggered Associated task is triggering, now how i will pass the notification number to work flow container.
Please help meI think you can
SWC_CREATE_OBJECT 'QMObject' Object Key
Or you can pass the QM number to the Workflow and use GENERICINSTANTIATE Method of Business Object SYSTEM to instantiate the QM Business Object.
Thanks
Arghadip -
How to create Incoming Email Activity using BAPI or Function module
To create an Incoming Email Activity using BAPI 'BAPI_ACTIVITYCRM_CREATEMULTI' or using 'CRM_ORDER_MAINTAIN' . what parameters i need to pass to a bapi.
Suggest me with a solution.
Regards,
SanjaniFor activity you must fill the following structures of 'CRM_ORDER_MAINTAIN'...
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_activity_h = t_activity_h
iv_collect_exceptions = ''
CHANGING
ct_orderadm_h = t_orderadm_h
ct_input_fields = t_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
And at the end you must use also 'CRM_ORDER_SAVE' to performe the save.
Regards. -
How to use Change doc Function Module?
Fn mod:ZSUBTESTCHG_WRITE_DOCUMENT
Import parameters Value
OBJECTID ZSUBTESTCHG
TCODE SE37
UTIME 00:00:00
UDATE 09.03.2009
USERNAME 'TESTUSER'
PLANNED_CHANGE_NUMBER
OBJECT_CHANGE_INDICATOR I
PLANNED_OR_REAL_CHANGES R
NO_CHANGE_POINTERS
UPD_ICDTXT_ZSUBTESTCHG I
N_ZSUBTEST 2 TEST
O_ZSUBTEST 2 TEST
UPD_ZSUBTEST I
Tables Value
ICDTXT_ZSUBTESTCHG 0 Entries
I have a ztable 'ZSUBTEST' with 2 fields DEPTID and DEPNAME and ticked "change document" for data element.
I have created the above change doc write fn module. I am trying to insert a new reocrd into table.
How to use ZSUBTESTCHG_WRITE_DOCUMENT so that even if i try to change an existing record in ztable the old and new values for a particulat ztable will be filled in CDPOS Table.
Would appreciate if you can suggest me how to use in1) Update and 2) Insert scenarios.
Thanks,
Subbahi check this,
Types Declaration***
types: BEGIN OF X_audit,
Field of ZAUDIT TABLE OR a custom created table------
END OF X_audit.
Data Declaration***
Data: w_newvalues type X_audit,
w_oldvalues type X_audit.
DATA: BEGIN OF t_cdtxt OCCURS 0.
INCLUDE STRUCTURE cdtxt.
DATA: END OF t_cdtxt.
DATA: l_tcode type cdhdr-tcode ,
l_time type cdhdr-utime,
l_usnam type cdhdr-username,
l_date type cdhdr-udate.
**Constants****
CONSTANTS : l_objectid TYPE cdhdr-objectid VALUE 'ZAUDIT_CD'.
Initialization.
Clear: l_tcode,l_time, l_usnam, l_date.
Clear: w_newvalues, w_oldvalues.
**Start-Of-Selection**
Start-of-selection.
*Populating w_oldvalues workarea with old values from the table
Select single * from zaudit_t
Into w_oldvalues
Where belnr eq belnr_1
And gjahr eq gjahr_1
And bukrs eq bukrs_1. u201C where, belnr_1, gjahr_1, bukrs_1 are the fields on selection screen.
here we are populating w_newvalues workarea with new values
W_newvalues-f1 = w_oldvalues-f1
f2 = u2018XXXXXXXu2019 -
f3 = u2018YYYYYYYu2019
f4 = u2018ZZZZZZZu2019
l_tcode = sy-tcode.
l_time = sy-uzeit.
l_usnam = sy-uname.
l_date = sy-datum.
modify the table with new values***
MODIFY zaudit_t FROM w_submit.
IF sy-subrc EQ 0.
MESSAGE 'Document Updated' TYPE 'S'.
call function 'ZAUDIT_CD1_WRITE_DOCUMENT'
exporting
objectid = l_objectid
tcode = l_tcode
utime = l_time
udate = l_date
username = l_usnam
PLANNED_CHANGE_NUMBER = ' '
object_change_indicator = 'U' u201CU-update, I-insert, D-delete
PLANNED_OR_REAL_CHANGES = ' '
NO_CHANGE_POINTERS = ' '
upd_icdtxt_zaudit_cd = 'U'
n_zaudit_t = w_newvalues u201Cpass the work area containing new values
o_zaudit_t = w_oldvalues u201Cpass the work area containing old values
upd_zaudit_t = 'U' u201C this parameter gives the values in the columns(new value, old value and changed field name) of table CDPOS.
tables
icdtxt_zaudit_cd = t_cdtxt
ELSE.
MESSAGE 'Document Not Updated' TYPE 'S'.
ENDIF. u201CIF sy-subrc EQ 0. -
How to use the alv function module
hi all,
can any one help me out how to use reuse_alv_block_list_append function module, what parameters shall i pass to it, so that i get top of page and end of page events and report data in two blocks, can any one tell how can i didvide the data into block, at a particular linehi,
this is my simple alv blockedlist programme.go through it.it will definrtley help u.
REPORT z50870alv_blocked.
TYPE-POOLS : slis.
*& structure declaration
TYPES : BEGIN OF st_ekko,
ebeln TYPE ekko-ebeln, "Purchasing Document Number
bstyp TYPE ekko-bstyp, "Purchasing Document Category
bsart TYPE ekko-bsart, "Purchasing Document Type
aedat TYPE ekko-aedat, "record created on
ernam TYPE ekko-ernam, "Person who Created the Object
END OF st_ekko.
TYPES : BEGIN OF st_ekpo,
ebeln TYPE ekko-ebeln,
ebelp TYPE ekpo-ebelp, "Item Number of Purchasing Document
ematn TYPE ekpo-ematn, "Material number
matkl TYPE ekpo-matkl, "Material group
netpr TYPE ekpo-netpr, "Net price in purchasing document
END OF st_ekpo.
*& internal table and work area declaration
DATA : it_ekpo TYPE STANDARD TABLE OF st_ekpo,
it_ekko TYPE STANDARD TABLE OF st_ekko,
it_fieldcat1 TYPE slis_t_fieldcat_alv,
wa_fieldcat1 TYPE slis_fieldcat_alv,
it_fieldcat2 TYPE slis_t_fieldcat_alv,
wa_fieldcat2 TYPE slis_fieldcat_alv,
it_events Type slis_t_event,
wa_layout TYPE slis_layout_alv.
*& data declaration
DATA : v_ebeln TYPE ekko-ebeln.
*& selection-screen
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-000.
SELECT-OPTIONS : so_ebeln FOR v_ebeln.
SELECTION-SCREEN END OF BLOCK a.
*& At-selection-screen
at selection-screen on so_ebeln.
perform validate_ebeln.
*& start-of-selection
START-OF-SELECTION.
PERFORM data_retrieval.
*& end-of-selection
END-OF-SELECTION.
PERFORM initialize_alv_block.
PERFORM build_fieldcatalog1.
PERFORM build_fieldcatalog2.
PERFORM build_layout.
PERFORM get_events .
PERFORM append_ekkodata_to_alv_block.
PERFORM append_ekpodata_to_alv_block.
PERFORM display_blocked_alv.
*& FORM initialize_alv_block
FORM initialize_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid.
endform.
*& FORM validate_ebeln
form validate_ebeln.
select ebeln
from ekko
into table it_ekko
where ebeln in so_ebeln.
if sy-subrc ne 0.
message text-003 type 'W'.
endif.
endform.
*& FORM data_retrieval
FORM data_retrieval.
SELECT ebeln bstyp bsart aedat ernam
FROM ekko
INTO TABLE it_ekko
WHERE ebeln IN so_ebeln.
if sy-subrc ne 0.
message text-001 type 'I'.
endif.
SELECT ebeln ebelp ematn matkl netpr
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln IN so_ebeln.
if sy-subrc ne 0.
message text-002 type 'I'.
endif.
endform.
*& Form build_fieldcatalog1
FORM build_fieldcatalog1.
wa_fieldcat1-fieldname = 'EBELN'.
wa_fieldcat1-seltext_l = 'PURCHASE ORDER'.
wa_fieldcat1-col_pos = 0.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'BSTYP'.
wa_fieldcat1-seltext_l = 'DOCUMENT CATEGORY'.
wa_fieldcat1-col_pos = 1.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'BSART'.
wa_fieldcat1-seltext_l = 'DOCUMENT TYPE'.
wa_fieldcat1-col_pos = 2.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'AEDAT'.
wa_fieldcat1-seltext_l = 'DATE'.
wa_fieldcat1-col_pos = 3.
APPEND wa_fieldcat1 TO it_fieldcat1.
wa_fieldcat1-fieldname = 'ERNAM'.
wa_fieldcat1-seltext_l = 'NAME'.
wa_fieldcat1-col_pos = 4.
APPEND wa_fieldcat1 TO it_fieldcat1.
ENDFORM. "build_fieldcatalog
*& Form build_fieldcatalog2
FORM build_fieldcatalog2.
wa_fieldcat2-fieldname = 'EBELN'.
wa_fieldcat2-seltext_l = 'PURCHASE ORDER'.
wa_fieldcat2-col_pos = 0.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'EBELP'.
wa_fieldcat2-seltext_l = 'ITEM NUMBER'.
wa_fieldcat2-col_pos = 1.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'EMATN'.
wa_fieldcat2-seltext_l = 'MATERIAL TYPE'.
wa_fieldcat2-col_pos = 2.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'MATKL'.
wa_fieldcat2-seltext_l = 'MATERIAL GROUP'.
wa_fieldcat2-col_pos = 3.
APPEND wa_fieldcat2 TO it_fieldcat2.
wa_fieldcat2-fieldname = 'NETPR'.
wa_fieldcat2-seltext_l = 'NET PRICE'.
wa_fieldcat2-col_pos = 4.
wa_fieldcat2-do_sum = 'X'.
APPEND wa_fieldcat2 TO it_fieldcat2.
ENDFORM. "build_fieldcatalog
*& form build_layout.
FORM build_layout.
wa_layout-zebra ='X'.
wa_layout-no_vline = 'X'.
wa_layout-no_hline = 'X'.
wa_layout-colwidth_optimize = 'X'.
wa_layout-window_titlebar = 'PURCHASE ORDER HEADER AND ITEM DETAILS'.
ENDFORM. "build_layout
*& form append_ekkodata_to_alv_block
FORM append_ekkodata_to_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat1
i_tabname ='it_ekko'
it_events = it_events[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekko
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
*& form append_ekpodata_to_alv_block
FORM append_ekpodata_to_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = wa_layout
it_fieldcat = it_fieldcat2
i_tabname ='it_ekpo'
it_events = it_events[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekpo
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
*& FORM display_blocked_alv.
FORM display_blocked_alv.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
endform.
*& Form GET_EVENTS
FORM get_events .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 2
IMPORTING
et_events = it_events[]
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " GET_EVENTS\
regards,
pavan t. -
How to use fieldtab with Function Module F4IF_INT_TABLE_VALUE_REQUEST
Hi,
I'm using the function module F4IF_INT_TABLE_VALUE_REQUEST to build a matchcode in a selection screen parameter.
The internal table that I use have 3 fields:
GROUPID like APQI-GROUPID,
CREDATE like APQI-CREDATE,
STATE type string.
STATE is not in ABAP dictionary, so the function doesn't show this field. I need this field having field label 'STATUS'
I have tried to use table FIELDTAB, but I cannot resolv the problem.
Can anyone help me?
Kind RegardsHi
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
Regards
Anji -
How to config Check Digits function module for Student Number Validation
Hi SLCM Experts,
In the SAP-SLCM, How to use check digits function module for validate student number. Just only config it or need to customizing program.
*Any idea to student number validation in SLCM?*
Best Regards,
Suvatchai K.Hi ,
Can you expalin it further ?
You configure the St. no in piq_matr . And set it as external or internal no. range which suits your business .
What is the validation you are looking for ?
Regards
Gajalakshmi -
Using subroutines in Function Module
Hi , experts ,
I want to know how to use performs in function module,
If created subroutine must be used in all FM in Func.Group ?
if you have articles about this or any information , I will be glad .
Please help.
Regards,
Tatiana.If i am not mistaken you want to use forms in function module.
To enable forms in function module you have to follow these steps:
Create a Z include in your function module.
INCLUDE ZTEST_INCLUDE.
Inside this include you need to write your form routine which will be accessable from your function module.
Now you can use perform statement in your funtion module.
Thnaks & Regards,
Lalit Mohan Gupta -
How to use BAPI function module for maintaing product type to material
Hi,
Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
for maintaining the product type for the material using change number.
Pts will be rewarded.
Best Regards,
PadhyHi,
Can you pls suggest me how to use BAPI Fuction module CCAP_REV_LEVEL_MAINTAIN
for maintaining the product type for the material using change number.
Pts will be rewarded.
Best Regards,
Padhy -
How to find Exits in Function Module & BAPI
Hi,
How to find exits in Function Module & BAPI.
Thanks In advanceHi,
i ve a standard FM IDOC_INPUT_SALESORDER_CREATEFR which creates sales order using BAPI (inbound process).
Now my requirement is to check for some custom segment field if its not initial i ve to change item category field in line item for sales order.
could u pls help me in this.
Thanks in advance. -
How to make use of SE37- Function Module & how to find out the table?
Hi ,
1.Could anyone help me what's this SE37-Function module is all about,How to make use of this?
For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM.
But after giving the particular name what should i do?
Please help me.
2.How to find out the respective table for a particular field sya for T code-COGI, T code MFBF,where its values are getting populated.,Please help in this issue.
Thanks in adavnce for spending some time
Raj.SHi Raj
Function Modules
Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
The Function Builder also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
Check this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
You can execute function module in SE37ie you can perform the activiites defined in the function module by executing it.
By deleting BOM you mention the FM name in se37 and execute. In some function module it will ask input parameters as developed in the program , you have to give the input parameters and execute. -
How to get tables used by a Function Module
Hi,
How to know the tables used by a function module dynamically.
Cuurently im using BAPI_MATERIAL_SAVEDATA in my report program.
I tried FM GET_TABLES to know the tables, but could see only tables used in the report.
Main issue in my case is when im running this update program, could observe different tables being displayed as updated in SM50(Process Overview).Want to clarify as why these tables which are not being used in my report are being displayed in SM50.
So was doubtin weather this FM is using these displayed tables.
Thanks in advance for u r replys.
Regards,
DedeepyaHi Dedeepya,
you could use a SQL Trace (tx. ST05) to list all tables affected and operations that realize. Just active the trace, execute FM, and Deactive trace. Then click in "Display trace" and check it.
Best regards,
Pablo -
How to do data source ehancement by using "Extraction by function module"
I have one customized datasource "ZSOURCE" in R/3, this datasource use Extraction by function module, namely one functiona
module "ZBI_FM_EX"and Extract. struct "ZBI_EX".
Now I want to add one field "ZNEW" from standard SAP table LIKP into extractor "ZBI_EX" and write coding in ZXRSAU01.
Question, could I add new field "ZNEW" into Structure:"ZBI_EX"? Do I need to change anything in functional module "ZBI_FM_EX" itself?
Many Thanks!
rajatina.Hi Dear,
It is good to write the code in your function module i.e. ZBI_FM_EX. becuase writing the code in ZXRSAU01 include program will affect the loading performance. instead of looping the data two time (one in your FM and again in ZXRSAU01 ), you can get the same will only loop.
Thanks
Obaid
Edited by: obaid shaikh on Jan 21, 2011 11:53 AM -
Is there any BAPI or function module to delete entries from a table (VBAK)
Hi Everybody,
this is my first thread in SDN...
my problem follows...
A report is be created that selects all sales orders created by e-Sales that are more than 20 minutes old and still have a delivery block:
tables:
VBAK sales document: header data
selection fields:
VBAK-LIFSK ≠ <BLANK>
VBAK-ERNAM = userID used by e-Sales / IVE
(EP-BATCH / EAI-BATCH)
VBAK-ERDAT <= Current system Date
VBAK-ERZET <= Current system Time - 20 minutes
These orders should be deleted from SAP system.
This report should be scheduled to run regularly every 10 minutes.
my doubt : is ther any BAPI or Function module to delete entries from a standard table...if no what is the way to delete the enteries from a std table...
best replies will be rewarded....
regards
ReddyHi Vasanth ,
thanks for your reply.
i tried in the same manner what u mentioned.
but how to pass only one parameter to the functionmodule..
here in this case we have to pass only update flag as 'D'..
i did the same it giving dump..
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
not caught and
therefore caused a runtime error.
The reason for the exception is:
The call to the function module "BAPI_SALESORDER_CHANGE" is incorrect:
In the function module interface, you can specify only
fields of a specific type and length under "ORDER_HEADER_INX".
Although the currently specified field
"INT_ORDER_HEADER_INX" is the correct type, its length is incorrect.
my pgm :
*& Report YNEW_ORDER_DELETION
REPORT ynew_order_deletion.
TABLES:vbak.
PARAMETERS:
p_lifsk LIKE vbak-lifsk DEFAULT '02'.
SELECT-OPTIONS:
s_lifsk FOR vbak-lifsk DEFAULT '10',
s_ernam FOR vbak-ernam,
s_erdat FOR vbak-erdat,"DEFAULT sy-datum.
s_erzet FOR sy-uzeit.
*PARAMETERS:
p_erzet LIKE sy-uzeit.
s_erdat like vbak-erdat,
s_erzet like vbak-erzet.
DATA:
BEGIN OF int_final OCCURS 0,
w_vbeln TYPE vbak-vbeln,
END OF int_final.
DATA:
int_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: int_order_header_inx LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA:
wf_time TYPE sy-uzeit.
INITIALIZATION.
s_ernam-low = 'KULKARMA'.
s_ernam-sign = 'I'.
s_ernam-option = 'EQ'.
APPEND s_ernam.
s_ernam-low = 'EAI-BATCH'.
s_ernam-sign = 'I'.
s_ernam-option = 'EQ'.
APPEND s_ernam.
wf_time = sy-uzeit - 1200.
p_erzet = sy-uzeit - 1200.
p_erzet-low = wf_time.
APPEND s_erzet.
int_order_header_inx-updateflag = 'D'.
APPEND int_order_header_inx.
START-OF-SELECTION.
SELECT vbeln FROM vbak
INTO TABLE int_final
WHERE lifsk EQ p_lifsk
AND ernam IN s_ernam
AND erdat IN s_erdat
AND erzet IN s_erzet.
IF sy-subrc = 0.
LOOP AT int_final.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = int_final-w_vbeln
ORDER_HEADER_IN =
order_header_inx = int_order_header_inx
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
NO_STATUS_BUF_INIT = ' '
TABLES
return = int_return
ORDER_ITEM_IN =
ORDER_ITEM_INX =
PARTNERS =
PARTNERCHANGES =
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
SCHEDULE_LINES =
SCHEDULE_LINESX =
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN =
ENDLOOP.
LOOP AT int_return.
WRITE:/ int_return-type,
int_return-id,
int_return-number,
int_return-message.
ENDLOOP.
ENDIF.
please help me ..its a very urgent issue to be solved...
am waiting for ur reply...
regards
gangareddy -
Standard BAPI or Function Module for FB01posting
Hi Experts,
My requirement is as follows.
Invoice details would be sent across from Middleware to SAP and for which I have developed a Custom Remote Enabled Function Module. The Function Module needs to post the data using FB01 Transaction.
I had planned for recording a BDC for FB01 and post the data, however, we are on the verge of getting upgraded from 4.7 to ECC 6.0. To avoid problems that we might face for change of screens in ECC 6.0, I would prefer using a BAPI or Function Module for FB01 posting, if available, instead of BDC.
Data coming from Middleware are as follows.
HEADER:
BKPF-BLDAT : Document Date
BKPF-BUDAT : Posting Date
BKPF-XBLNR: Reference (Invoice#)
BKPF-BLART : Document Type
BKPF-BUKRS : Company Code
BKPF-BKTXT : DocHeader Text
BKPF-WAERS : Currency
LINE ITEM:
BSEG-LIFNR : Vendor no
BSEG-WRBTR - Total amt -Debit/Credit -Vendor
BSEG-ZUONR : Assignment field
BSEG-EMPFB : Alternative Payee
BSEG-UZAWE : Payment Method Supplement
BSEG-ZTERM : Pmt terms
BSEG-KOSTL : Costcenter
BSEG-HKONT : GL AccountNumber
BSEG-WRBTR : Amount for GL
BSEG-SGTXT : Line item text
The Vendor Line Item would be one where as GL line items could me more than one.
Can any of you suggest me a standard BAPI or Func Mod?
Points will be awarded for valuable inputs.
Thanks to all!!!!You can use RFBIBL00 program for FB01 postings. Go through the program help on how to use this program.
This program requires a file to be on application server in a certain format.
You may also refer the program RFBIBLT0 on how the file format should be.
Hope this helps.
Thanks,
SKJ
Maybe you are looking for
-
Problem with opening a file in its application using Runtime
Dear experts, excuse me for my ignorance, but I am facing a problem and I would really appreciate some help. I am working on a java program in which I want the user to have the ability to save the contents of a JTable into a file of his preference (t
-
Refcursor returning image (BLOB type) from database
Hi, Process : Invoke activity takes ID as input parameter and passes it to partner link (db adapter) which executes stored proc returning a ref cursor. SQL statement in stored proc - ref cursor has a column with BLOB type. Problem : Unable to return
-
Error while running System Analyzer
Hi, While trying to run System Analyzer from /usr/sap/EPD/DVEBMGS02/j2ee/portal_misc/analyzer(AIX System),getting the following error j2ee.path=/ java.lang.NullPointerException at com.sapportals.utilities.analyzer.ui.j2ee.Launcher.setP4(Launc
-
REALLY fast stop motion..HELP!
So I am trying to make a stop motion using imovie 09 and it wont let me make the clips shorter then .1 seconds...does anybody know how I can make them shorter? I am trying to make this REALLY fast...Help!! This is for a major film project I am workin
-
hi guys i have two textfields and i would like to run some event if the ENTER is pressed. before i had only textfield and i was using this public void actionPerformed(ActionEvent e) { if (e.getModifiers() == 0) { //do some