Function Module to read RT values of simulation payroll results
Hi experts
Is there any function module where I can pass parameter to run payroll simulation and get RT cluster data or the final amount, before running the actual payroll.
Thanks ,
Saikumar
Hi,
Check the following function modules.
AISC_CALC_EXPIRED_USEFUL_LIFE.
Check the following link it might be of some help to you.
Re: asset useful life
Regards,
Ram.
Similar Messages
-
Function Module to read stack values.
Hello,
Is there is any function module to read the stack values.
My requirement is
I have 3 FM modules say FM_A, FM_B & FM_C.
FM_A will call FM_C.
FM_B will call FM_C.
In FM_C, I need to identify whether the call has been made from FM_A or FM_B without changing these two function modules and by changing only FM_C.
Please help me out.
Thx....without changing these two function modules ...
If FM_A & FM_B in ont functional group - no way.
If functional groups of these FM is defferent you can try get any variable from top include.
Need add procedure in FM_C
ASSIGN ('(SAPLxxxx)yyyy') TO <FS>, where
xxxx - function group name
yyyy - variable from top include
IF field-symbol is assigned - FM from this group started our FM.
That's will worked only if new LUW started and modules called by once. Very ugly method and not 100% garanty, but I don't know any else. -
Function Module to Read attributes value from Classification tab
Dear Experts ,
We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
I want to read those values and use those in one of the report.
Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
Thanks in advnce,
Regards,
NikhilYou can check those details using CT06 transaction.
FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
class = gc_class
classtext = 'X'
classtype = gc_classtype
clint = gc_mmpsk
features = 'X'
language = sy-langu
object = l_object
key_date = sy-datum
initial_charact = 'X'
change_service_clf = ' '
inherited_char = 'X'
TABLES
t_class = lt_class
t_objectdata = lt_objectdata
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4. -
Function Module to read tax in FB60
Hi Gurus,
Is there a function module that reads the values in the folder "taxes" (tax amount) during the recording FB60?
I need something similar to function module FI_WT_GET_X_WITH_ITEM.
Thanks
NikHi Nocola,
Try using this Function Module CALCULATE_TAX_FROM_NET_AMOUNT.
Thanks and Regards
Rinzy Deena Mathews -
Any function module to read all the values in Tcode-PPQD?
Hi all
Is there any function module to read all the values in Tcode-PPQD (Display Qualifiaction Catalog).
and any idea what tables are involved to get these values like parent and child relationship?
Thanks in advance.
Murali.Murali,
you can use the following..
data: w_sobid type sobid, "Qualification ID
w_objid type objid. "Qualification Catalog
select objid into w_objid
up to 1 rows
from HRP1001
where otype = 'QK'
and plvar = '01'
and istat = 1
and risgn = 'B'
and relat = '030'
and endda ge sy-datum
and begda le sy-datum
and sclas = 'Q'
and sobid = w_sobid.
endselect.
if sy-subrc eq 0.
write: / w_objid,w_sobid.
endif.
Regards,
Suresh Datti -
Is there any RFC function module to read domain fixed value
Hi,
Is there any RFC function module to read domain fixed value from remote system in basis layer?
As we cannot simply wrap DD_DOMVALUES_GET with a new RFC module,because remote system will not install our component, our wrap function module is not there.
We may need a RFC fm from basis layer.HI,
Try using Function Module:
DD_DOMA_GET , If it is RFC enabled it can be used for reading the domain,
Kindlly go through this link below:
How to get "Fixed Domain Values" from other system by RFC-Call?
Hope it helps,
Regards
Mansi -
Hi. i used Function module to change Characteristic values of a sales order
hi. i used Function module to change Characteristic values of a sales order..
but sales order's Characteristic values didn't change.
And the Function module doesn't occur any log message.
please tell me wrong code, and how to solve this problem.
if i have wrong method, what data can i pass to change the characteristic values
DATA: LT_E1CUVAL TYPE TABLE OF E1CUVAL.
DATA: WA_E1CUVAL TYPE E1CUVAL.
DATA: LS_CFG_HEAD LIKE CUXT_CUCFG_S,
LS_INSTANCES LIKE CUXT_CUINS_S,
LS_VALUES LIKE CUXT_CUVAL_S,
LS_E1CUCFG LIKE E1CUCFG,
LS_E1CUINS LIKE E1CUINS,
LS_E1CUVAL LIKE E1CUVAL,
LS_PROFILE LIKE E1CUCOM,
LS_VBAP LIKE VBAP,
L_CUOBJ LIKE INOB-CUOBJ,
L_ATINN LIKE CABN-ATINN.
DATA: LT_INSTANCES LIKE CUXT_CUINS_S OCCURS 0,
LT_PART_OF LIKE CUXT_CUPRT_S OCCURS 0,
LT_VALUES LIKE CUXT_CUVAL_S OCCURS 0,
LT_VAR_KEYS LIKE CUXT_CUVK_S OCCURS 0,
LT_KSML LIKE KSML OCCURS 0 WITH HEADER LINE,
BEGIN OF LT_CLINT OCCURS 0,
CLINT LIKE KSSK-CLINT,
END OF LT_CLINT.
DATA: LT_CUIB LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
DATA: E_ROOT_INSTANCE TYPE CUXT_INSTANCE_NO.
DATA: EV_ROOT_PERSIST_ID TYPE IBEXTINST_DATA-EXT_INST_ID.
DATA: EV_CFG_HAS_CHANGED TYPE XFELD.
DATA: EV_HANDLE_APPL_LOG TYPE BALLOGHNDL.
DATA: L_CUOBJ_NEW TYPE CUOBJ.
DATA: L_OWNER TYPE IBXX_BUSINESS_OBJECT.
REFRESH LT_E1CUVAL.
CLEAR LS_VBAP.
SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
FROM VBAP WHERE VBELN = I_VBELN
AND POSNR = I_POSNR.
IF SY-SUBRC <> 0.
RAISE INSTANCE_NOT_FOUND.
ENDIF.
REFRESH LT_CUIB. CLEAR LT_CUIB.
LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
APPEND LT_CUIB.
CALL FUNCTION 'CUCB_INITIALIZER'
EXPORTING
IT_INSTANCES = LT_CUIB[].
CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
EXPORTING
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
IMPORTING
E_CFG_HEAD = LS_CFG_HEAD
ES_PROFILE = LS_PROFILE
ET_RETURN = ET_RETURN
TABLES
E_TAB_INSTANCES = LT_INSTANCES
E_TAB_PART_OF = LT_PART_OF
E_TAB_VALUES = LT_VALUES
E_TAB_VAR_KEYS = LT_VAR_KEYS
EXCEPTIONS
INVALID_INSTANCE = 1
NO_ROOT_INSTANCE = 2
INSTANCE_IS_A_CLASSIFICATION = 3
INTERNAL_ERROR = 4
NO_PROFILE_FOUND = 5
INVALID_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE INSTANCE_NOT_FOUND.
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ELSE.
LOOP AT LT_VALUES INTO LS_VALUES.
IF LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
LS_VALUES-VALUE = '7100010'. "This is test data
MODIFY LT_VALUES FROM LS_VALUES.
ELSE.
DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
ENDIF.
CLEAR LS_VALUES.
ENDLOOP.
ENDIF.
영업정보 특성 변경
CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
EXPORTING
I_CFG_HEADER = LS_CFG_HEAD
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
I_PLANT =
I_STRUCTURE_EXPLOSION_DATE =
I_STRUCTURE_EXPLOSION_APPL_ID =
I_LOGSYS =
IS_PROFILE = LS_PROFILE
IV_ONLY_SINGLE_LEVEL =
IV_HANDLE_APPL_LOG =
IV_OBJECT_APPL_LOG = 'CIF'
IV_SUBOBJECT_APPL_LOG = 'T_CNFG'
IMPORTING
E_ROOT_INSTANCE = E_ROOT_INSTANCE
EV_ROOT_PERSIST_ID = EV_ROOT_PERSIST_ID
EV_CFG_HAS_CHANGED = EV_CFG_HAS_CHANGED
EV_HANDLE_APPL_LOG = EV_HANDLE_APPL_LOG
ET_RETURN = ET_RETURN
TABLES
I_TAB_INSTANCES = LT_INSTANCES
I_TAB_PART_OF = LT_PART_OF
I_TAB_VALUES = LT_VALUES
I_TAB_VAR_KEYS = LT_VAR_KEYS
I_TAB_BLOB =
EXCEPTIONS
NO_CONFIGURATION_DATA = 1
NO_ROOT_INSTANCE = 2
INVALID_INSTANCE = 3
INSTANCE_IS_A_CLASSIFICATION = 4
INTERNAL_ERROR = 5
NO_PROFILE_FOUND = 6
INVALID_DATA = 7
OTHERS = 8
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE NO_CONFIGURATION_DATA.
WHEN 3.
RAISE NO_ROOT_INSTANCE.
WHEN 3.
RAISE INVALID_INSTANCE .
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN 3.
RAISE INTERNAL_ERROR.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ENDIF.
COMMIT WORK.
save configuration with next commit
CLEAR: LS_INSTANCES.
READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
L_OWNER-OBJECT_KEY = LS_INSTANCES-OBJ_KEY.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
ROOT_INSTANCE = LS_VBAP-CUOBJ
ROOT_OBJECT = L_OWNER
IMPORTING
NEW_INSTANCE = L_CUOBJ_NEW
EXCEPTIONS
INVALID_INSTANCE = 1
INVALID_ROOT_INSTANCE = 2
NO_CHANGES = 3
OTHERS = 4.
IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
CLEAR LS_VBAP-CUOBJ.
RAISE INTERNAL_ERROR.
ELSEIF SY-SUBRC = 1.
LS_VBAP-CUOBJ = L_CUOBJ_NEW.
ENDIF.
What's wrong?
help me to solve this problem.
Thanks a lot.<b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
<b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
<b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
<b>SD_PARTNER_READ</b> all the partners information and addresses
<b>SD_DETERMINE_CONTRACT_TYPE</b>
In: at least VBAK-VBELN
Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
<b>SD_SALES_DOCUMENT_COPY</b>
<b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW Data collection for printing
called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
regards
vinod -
Function module to validate input value
Hi all,
can you please provide me the name of the function module to validate input value.
I have a case where i have to validate decimal values. sometimes users may enter wrong decimal values by mistake instead of "0.23" "0..23' and it gives CONVT_NO_NUMBER runtime error so have to come up with some solutions to validate user input.
Please provide me Function module if anybody knows.
Thanks,Try this one
data: lv_htype TYPE dd01v-datatype.
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = my_number
IMPORTING
htype = lv_htype.
IF lv_htype NE 'NUMC'.
Raise an error here...
ENDIF. -
Function module to read the expired useful life of asset
Hi,
Is there a function module to read the expired useful life of asset. We are using the depriciation start date to calculate the expired useful life of asset, but the fiscal year shift and matching the calendar year with fiscal is causing the logic to give a month difference between the calculated value and the value in the asset.
Please let me know if there is a Function module or BAPI for getting the values. Kindly provide example for the function module call too.
Regards,
Prabaharan.GHi,
Check the following function modules.
AISC_CALC_EXPIRED_USEFUL_LIFE.
Check the following link it might be of some help to you.
Re: asset useful life
Regards,
Ram. -
Function Module to read Timeseries data in SNP
Hi Gurus,
Is there a function module to read timeseries KF (in SNP book)? I need to use this in deployment userexit to read time series values of other Product/Location combination.
I tried using 'BAPI_PBSRVAPS_GETDETAIL2' with in the userexit but i got simsession error.
Thanks,Hi BKN,
Check the below function modules,
1) /SAPAPO/OM_STOCK_TSERIES_GET
2) /SAPAPO/RET_DB_GET_TIMESERIES
3) /SAPAPO/SCC_SHOW_TIME_SERIES
4) /SCA/INTF_APO_TS_TIMESERI_READ
Regards
R. Senthil Mareeswaran. -
Function module to read the the idoc
Hi abap gurus,
I have an inbound idoc coming form a wms system .The IDOC is for goods recieved . how can I read the idoc to update the inbound delivery data in the sap system ? Is there any function module to read the data from teh inbound idoc ?Hi Gaurab,
Creating a Function Module (Direct Inbound Processing)
This step describes how to create a function module which is identified by the IDoc Interface using a new process code and called from ALE (field TBD52-FUNCNAME). Direct inbound processing using a function module (not using a workflow) always includes the ALE layer. This setting (processing with function module and ALE layer) is identified by the value 6 in the field TEDE2-EDIVRS, which is read by the function module IDOC_START_INBOUND. IDOC_START_INBOUND then calls ALE.
Prerequisites
You must have completed the required steps in Defining and Using a Basic Type .
Procedure
Choose Tools ® ABAP Workbench ® Development ® Function Builder, and create a new function module.
Create the segments as global data in your function group. The function module should copy the application data from the segments into the corresponding application tables and modify the IDoc status accordingly. If an error occurs, the function module must set the corresponding workflow parameters for exception handling.
Activate the function module: From the initial screen of the Function Builder select .
In the example, create the function module IDOC_INPUT_TESTER with a global interface. The function module is called when an IDoc of type TESTER01 is received for inbound processing. You will assign an application object ("standard order") to this IDoc type and therefore maintain tables from SD. To do this, call transaction VA01 using the command CALL TRANSACTION. Please note that the intention here is not to simulate a realistic standard order, but only to illustrate how data reaches application tables from an IDoc table via segment structures (form routine READ_IDOC_TESTER) and how the function module triggers an event for exception handling (by returning suitable return variables to the ALE layer in the FORM routine RETURN_VARIABLES_FILL).
A comprehensive example of the code for an inbound function module is provided in the ALE documentation in the SAP Library under Example Program to Generate an IDoc. This function module, for example, also checks whether the logical message is correct and calls a (fictitious) second function module which first writes the application data and then returns the number of the generated document. In addition, status 53 is only set if the application document was posted correctly.
Administration parameters for IDOC_INPUT_TESTER
Application abbreviation
V (Sales and Distribution)
Processing type
Normal, start immediately
Interface for IDOC_INPUT_TESTER (global interface)
Formal parameters
Reference structure
Explanation
Import parameters
INPUT_METHOD
BDWFAP_PAR-INPUTMETHD
Describes how the function module is to be processed (example: in the background)
MASS_PROCESSING
BDWFAP_PAR-MASS_PROC
Mass inbound processing? (indicator)
Export parameters
WORKFLOW_RESULT
BDWFAP_PAR-RESULT
Set to 99999 if an event is to be triggered for error handling.
APPLICATION_VARIABLE
BDWFAP_PAR-APPL_VAR
Variable freely available from application for workflow
IN_UPDATE_TASK
BDWFAP_PAR-UPDATETASK
Asynchronous update? (indicator is not set in example)
CALL_TRANSACTION_DONE
BDWFAP_PAR-CALLTRANS
Transaction called? (indicator is not set in example)
Table
IDOC_CONTRL
EDIDC
IDoc control record
IDOC_DATA
EDIDD
IDoc data records
IDOC_STATUS
BDIDOCSTAT
IDoc status records for ALE
RETURN_VARIABLES
BDWFRETVAR
IDoc assigned to Object type method parameters.
SERIALIZATION_INFO
BDI_SER
If several IDocs are to be processed in a certain sequence: this structure contains the necessary information
Example
FUNCTION IDOC_INPUT_TESTER.
""Globale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC OPTIONAL
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
initialize SET/GET Parameter and internal tables
PERFORM INITIALIZE_ORGANIZATIONAL_DATA.
Move IDOC to internal tables of application
PERFORM READ_IDOC_TESTER.
call transaction Order Entry VA01
PERFORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
set status value
perform write_status_record using errorcode.
return values of function module
PERFORM RETURN_VARIABLES_FILL USING ERRORCODE.
ENDFUNCTION.
FORM INITIALIZE_ORGANIZATIONAL_DATA.
initialize SET/GET parameters
SET PARAMETER ID 'VKO' FIELD SPACE.
SET PARAMETER ID 'VTW' FIELD SPACE.
SET PARAMETER ID 'SPA' FIELD SPACE.
SET PARAMETER ID 'VKB' FIELD SPACE.
SET PARAMETER ID 'VKG' FIELD SPACE.
initialize internal tables
REFRESH BDCDATA.
CLEAR BDCDATA.
CLEAR BELEGNUMMER.
CLEAR ERRTAB.
REFRESH ERRTAB.
REFRESH XBDCMSGCOLL.
CLEAR XBDCMSGCOLL.
ENDFORM. " INITIALIZE_ORGANIZATIONAL_DATA
FORM READ_IDOC_TESTER.
PERFORM INITIALIZE_IDOC.
LOOP AT IDOC_DATA
WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
header data
WHEN 'E1HEAD'.
MOVE IDOC_DATA-SDATA TO E1HEAD.
PERFORM PROCESS_SEGMENT_E1HEAD.
position data
WHEN 'E1ITEM'.
MOVE IDOC_DATA-SDATA TO E1ITEM.
PERFORM PROCESS_SEGMENT_E1ITEM.
ENDCASE.
ENDLOOP.
only when there were one or more items
CHECK FIRST NE 'X'.
APPEND XVBAP. "last one
ENDFORM. " READ_IDOC_TESTER
FORM INITIALIZE_IDOC.
CLEAR XVBAK.
REFRESH XVBAP.
CLEAR XVBAP.
POSNR = 0.
FIRST = 'X'.
ENDFORM. " INITIALIZE_IDOC
FORM PROCESS_SEGMENT_E1HEAD.
requested date of delivery
WLDAT = E1HEAD-WLDAT.
delivery date
XVBAK-BSTDK = E1HEAD-BSTDK.
customer number
XVBAK-KUNNR = E1HEAD-AUGEB.
order number
XVBAK-BSTNK = E1HEAD-BELNR.
division
XVBAK-SPART = E1HEAD-SPART.
distribution channel
XVBAK-VTWEG = E1HEAD-VTWEG.
sales organization
XVBAK-VKORG = E1HEAD-VKORG.
order type
XVBAK-AUART = E1HEAD-AUART.
do not fill incoterms (inco1, inco2)
customer function
CALL CUSTOMER-FUNCTION '001'
EXPORTING
PI_VBAK621 = XVBAK
IMPORTING
PE_VBAK621 = XVBAK
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
ENDFORM. " PROCESS_SEGMENT_E1HEAD
FORM PROCESS_SEGMENT_E1ITEM.
position number
XVBAP-POSNR = XVBAP-POSNR + 1.
amount
XVBAP-WMENG = E1ITEM-MENGE.
unit
CALL FUNCTION 'ISO_TO_SAP_MEASURE_UNIT_CODE'
EXPORTING
ISO_CODE = E1ITEM-BMEINH
IMPORTING
SAP_CODE = XVBAP-VRKME
EXCEPTIONS
OTHERS = 0.
material number
XVBAP-MATNR = E1ITEM-LMATNR.
CALL CUSTOMER-FUNCTION '002'
EXPORTING
PI_VBAP621 = XVBAP
IMPORTING
PE_VBAP621 = XVBAP
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
APPEND XVBAP.
ENDFORM. " PROCESS_SEGMENT_E1ITEM
FORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
call transaction first dynpro
PERFORM DYNPRO_START.
call transaction double-line entry
PERFORM DYNPRO_DETAIL2.
incoterms
PERFORM DYNPRO_HEAD_300.
call transaction item datas
PERFORM DYNPRO_POSITION.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'SICH'.
determine input method
IF INPUT_METHOD IS INITIAL.
INPUT_METHOD = 'N'.
ENDIF.
call transaction VA01
CALL TRANSACTION 'VA01' USING BDCDATA
MODE INPUT_METHOD
UPDATE 'S'
MESSAGES INTO XBDCMSGCOLL.
errorcode = SY-SUBRC. " remember returncode for status update
ENDFORM. " CALL_VA01_IDOC_ORDERS
form write_status_record using errorcode.
FILL IDOC_STATUS
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IF ERRORCODE = 0.
IDOC_STATUS-STATUS = BELEG_GEBUCHT. "value 53
GET PARAMETER ID 'AUN' FIELD BELEGNUMMER.
IDOC_STATUS-MSGID = 'V1'.
IDOC_STATUS-MSGNO = '311'.
IDOC_STATUS-MSGV1 = 'Terminauftrag'.
IDOC_STATUS-MSGV2 = BELEGNUMMER.
ELSE.
IDOC_STATUS-STATUS = BELEG_NICHT_GEBUCHT. "value 51
IDOC_STATUS-MSGID = SY-MSwGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
ENDIF.
APPEND IDOC_STATUS.
ENDFORM.
FORM DYNPRO_START.
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
DYNPRO-EINSTIEG
CHANGING LAST_DYNPRO.
ordertype
PERFORM DYNPRO_SET USING 'VBAK-AUART' XVBAK-AUART.
sales organization
PERFORM DYNPRO_SET USING 'VBAK-VKORG' XVBAK-VKORG.
Distribution channel
PERFORM DYNPRO_SET USING 'VBAK-VTWEG' XVBAK-VTWEG.
Division
PERFORM DYNPRO_SET USING 'VBAK-SPART' XVBAK-SPART.
Sales office
PERFORM DYNPRO_SET USING 'VBAK-VKBUR' XVBAK-VKBUR.
Sales group
PERFORM DYNPRO_SET USING 'VBAK-VKGRP' XVBAK-VKGRP.
ENDFORM. " DYNPRO_START
FORM DYNPRO_NEW USING PROGNAME
DYNPRONR
CHANGING LAST_DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGNAME.
BDCDATA-DYNPRO = DYNPRONR.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
LAST_DYNPRO = DYNPRONR.
ENDFORM. " DYNPRO_NEW
FORM DYNPRO_SET USING FELDNAME
FELDINHALT.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
dynpro field name
BDCDATA-FNAM = FELDNAME.
contents
BDCDATA-FVAL = FELDINHALT.
APPEND BDCDATA.
ENDFORM. " DYNPRO_SET
FORM DYNPRO_DETAIL2.
okcode
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-UER2.
fix dynpro number 4001
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
'4001'
CHANGING LAST_DYNPRO.
order party
PERFORM DYNPRO_SET USING 'KUAGV-KUNNR' XVBAK-KUNNR.
purchase order number
PERFORM DYNPRO_SET USING 'VBKD-BSTKD' XVBAK-BSTNK.
requested delivery date
PERFORM DYNPRO_DATE_SET USING 'VBKD-BSTDK' XVBAK-BSTDK.
purchase order date
PERFORM DYNPRO_DATE_SET USING 'RV45A-KETDAT' WLDAT.
ENDFORM. " DYNPRO_DETAIL2
FORM DYNPRO_DATE_SET USING FELDNAME
FELDINHALT.
DATA: DATE TYPE D.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
BDCDATA-FNAM = FELDNAME.
WRITE FELDINHALT TO DATE.
BDCDATA-FVAL = DATE.
APPEND BDCDATA.
ENDFORM. " DYNPRO_DATE_SET
FORM DYNPRO_HEAD_300.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-KKAU.
incoterms part 1
IF NOT XVBAK-INCO1 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO1' XVBAK-INCO1.
ENDIF.
incoterms part 2
IF NOT XVBAK-INCO2 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO2' XVBAK-INCO2.
ENDIF.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'BACK'.
ENDFORM. " DYNPRO_HEAD_300
FORM DYNPRO_POSITION.
LOOP AT XVBAP.
dynpro item double line entry
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'UER2'.
IF XVBAP-POSNR = 1.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(01)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(01)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(1)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(1)' XVBAP-VRKME.
ELSE.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'POAN'.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(02)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(02)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(02)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(02)' XVBAP-VRKME.
ENDIF.
ENDLOOP.
ENDFORM. " DYNPRO_POSITION
FORM RETURN_VARIABLES_FILL USING ERRORCODE.
allocate IDOC numbers to Workflow output parameters
IF MASS_PROCESSING <> SPACE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = PID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
RETURN_VARIABLES-WF_PARAM = APO.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
RETURN_VARIABLES-WF_PARAM = EID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ELSE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = APE.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ENDIF.
ENDFORM. " RETURN_VARIABLES_FILL
Globale Daten von IDOC_INPUT_TESTER
TABLES: E1HEAD, E1ITEM.
DATA: BEGIN OF BDCDATA OCCURS 500.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: BEGIN OF XVBAK. "Kopfdaten
INCLUDE STRUCTURE VBAK621.
DATA: END OF XVBAK.
DATA: BEGIN OF XVBAP OCCURS 50. "Position
INCLUDE STRUCTURE VBAP.
DATA: WMENG(18) TYPE C.
DATA: LFDAT LIKE VBAP-ABDAT.
DATA: KSCHL LIKE KOMV-KSCHL.
DATA: KBTRG(16) TYPE C.
DATA: KSCHL_NETWR LIKE KOMV-KSCHL.
DATA: KBTRG_NETWR(16) TYPE C.
DATA: INCO1 LIKE VBKD-INCO1.
DATA: INCO2 LIKE VBKD-INCO2.
DATA: YANTLF(1) TYPE C.
DATA: PRSDT LIKE VBKD-PRSDT.
DATA: HPRSFD LIKE TVAP-PRSFD.
DATA: END OF XVBAP.
DATA: BEGIN OF DYNPRO,
EINSTIEG LIKE T185V-DYNNR VALUE 101,
KKAU LIKE T185V-DYNNR,
UER2 LIKE T185V-DYNNR,
KBES LIKE T185V-DYNNR,
ERF1 LIKE T185V-DYNNR,
PBES LIKE T185V-DYNNR,
PKAU LIKE T185V-DYNNR,
PEIN LIKE T185V-DYNNR,
EID1 LIKE T185V-DYNNR,
POPO LIKE T185V-DYNNR,
EIPO LIKE T185V-DYNNR,
KPAR LIKE T185V-DYNNR,
PSDE LIKE T185V-DYNNR,
PPAR LIKE T185V-DYNNR,
KDE1 LIKE T185V-DYNNR,
KDE2 LIKE T185V-DYNNR,
PDE1 LIKE T185V-DYNNR,
PDE2 LIKE T185V-DYNNR,
PKON LIKE T185V-DYNNR,
END OF DYNPRO.
DATA: BEGIN OF PANEL,
KKAU LIKE T185V-PANEL VALUE 'KKAU',
UER2 LIKE T185V-PANEL VALUE 'UER2',
KBES LIKE T185V-PANEL VALUE 'KBES',
ERF1 LIKE T185V-PANEL VALUE 'ERF1',
PBES LIKE T185V-PANEL VALUE 'PBES',
PKAU LIKE T185V-PANEL VALUE 'PKAU',
PEIN LIKE T185V-PANEL VALUE 'PEIN',
EID1 LIKE T185V-PANEL VALUE 'EID1',
EIAN LIKE T185V-PANEL VALUE 'EIAN',
POPO LIKE T185V-PANEL VALUE 'POPO',
EIPO LIKE T185V-PANEL VALUE 'EIPO',
KPAR LIKE T185V-PANEL VALUE 'KPAR',
PSDE LIKE T185V-PANEL VALUE 'PSDE',
POAN LIKE T185V-PANEL VALUE 'POAN',
PPAR LIKE T185V-PANEL VALUE 'PPAR',
KDE1 LIKE T185V-PANEL VALUE 'KDE1',
KDE2 LIKE T185V-PANEL VALUE 'KDE2',
PDE1 LIKE T185V-PANEL VALUE 'PDE1',
PDE2 LIKE T185V-PANEL VALUE 'PDE2',
PKON LIKE T185V-PANEL VALUE 'PKON',
KOAN LIKE T185V-PANEL VALUE 'KOAN',
END OF PANEL.
DATA: BEGIN OF ERRTAB OCCURS 20,
TRANS LIKE TSTC-TCODE,
ARBGB LIKE T100-ARBGB,
CLASS(1) TYPE C,
MSGNR LIKE T100-MSGNR,
TEXT LIKE T100-TEXT,
TEXT(123) TYPE C,
MSGV1 LIKE SY-MSGV1,
MSGV2 LIKE SY-MSGV2,
MSGV3 LIKE SY-MSGV3,
MSGV4 LIKE SY-MSGV4,
END OF ERRTAB.
*---- Hilfsfelder -
DATA: PROGRAMM_AUFTRAG LIKE T185V-AGIDV VALUE 'SAPMV45A'.
DATA: LAST_DYNPRO LIKE T185V-DYNNR,
WLDAT LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
FIRST(1) TYPE C VALUE 'X'.
DATA: BEGIN OF XBDCMSGCOLL OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF XBDCMSGCOLL.
Terminauftrag ( Auftragsart wird fest gesetzt !)
DATA: BELEGNUMMER LIKE VBAK-VBELN.
DATA: ERRORCODE LIKE SY-SUBRC.
Statuswerte fuer IDOC-Status
DATA: BELEG_NICHT_GEBUCHT LIKE TEDS1-STATUS VALUE '51'.
DATA: BELEG_GEBUCHT LIKE TEDS1-STATUS VALUE '53'.
*- Direktwerte für Return_variables -
data:
eid like bdwfretvar-wf_param value 'Error_IDOCs',
pid like bdwfretvar-wf_param value 'Processed_IDOCs',
apo like bdwfretvar-wf_param value 'Appl_Objects',
ape like bdwfretvar-wf_param value 'Appl_Object'.
*- Direktwerte für Workflow_Result -
DATA: C_WF_RESULT_ERROR LIKE BDWFAP_PAR-RESULT VALUE '99999'.
thanks
karthik
DATA: C_WF_RESULT_OK LIKE BDWFAP_PAR-RESULT VALUE '0'. -
Function modules to read ibase at runtime
Hi guru's,
Is there any function modules to read ibase at run time if yes please send those function modules its urgent please please.
regards
naveen kumaranswered
-
Function Module to validate a value against domain fixed values
Hi,
Could anybody please let me know if there is a standard Function Module that takes a Value and Domain name as an input and checks if the input value exists in the Fixed Values of the domain.
Thanks,
ShalabhHi,
you can use fm FM_DOMAINVALUE_CHECK. Pass parameter values for I_DOMNAME and I_DOMVALUE.
If the value is invalid, exception VALUE_NOT_ALLOWED will occur.
Regards,
Klaus -
Function module to read data form customer tabels
hi,
can anyone suggest function module to read data form customer tabels?
Please give me reply.
TKS,
Dharani.PHi,
this thread is hvaing your answer.
Is there a Function module to get customer hierarchy data?
Regards,
Pravin -
Function module to read 'Customer Material InfoRecords'?
Is there a function module to read customer material inforecords?
Transaction code VD53 is the display screen for Customer Material INforecords. I have a requirement to read this data in user exit.
Thanks
GovaI found one FM. RV_CUSTOMER_MATERIAL_READ
But it won't serve my purpose as I need to find customer material number for a given material number.
But, I found the table where this information is stored. KNMT. I'm going to create a custom FM to serve my purpose.
Maybe you are looking for
-
HT1349 For some reason, when I pressed the power button...
When I went to go turn on my MacBook pro with Retina Display, the screen remained blank and black. In addition, the fan (it sounds like the fan) in the hard-drive of the laptop is making a lot of noise... what is wrong with my computer? It has been g
-
I have a series of compilations that has 25 volumes. They each have the titles UBB Vol. 1, UBB Vol. 2..etc through 25. The problem is that instead of listing them in the normal order when I sort by album in Itunes, they get sorted in the order 1, 11,
-
Problem install 9i Enterprise Edition
Hello I am installed Oracle 9i Enterprise Edition about Windows 2000 sp4. In the option 'configuration of database', i set Personality. In Database Creation step I get an error: Ora 01041 the hostdef extension does not exist and the error 0ra-24324,
-
i downloaded Microsoft visual studio 2010 in my laptop for windows 8 and in that the sql server is not working.the services for sql server is not starting .so pls help me in starting the services for sql server.
-
hai, what is the difference between call transaction and batch i/o in bdc with regards , ramnaresh