2007 Aug 27 10:39 AM
can i use existence check bapi's for validations( like.....checking the company code exist in database ).......instead of select single??????????????????????
Message was edited by:
raam
Message was edited by:
raam
can i use existence check bapi's for validations( like.....checking the company code exist in database ).......instead of select single??????????????????????
Message was edited by:
raam
Message was edited by:
raam
2007 Aug 28 1:21 PM
Hi,
We have function modules to check these things.for the company code use this
FM_CHECK_BUKRS_BT
AUTH_CHECK_BUKRS
Regards
Sudheer
2007 Aug 28 1:23 PM
you can try searching in SE37 by giving
BAPIBUKRS ,
BAPICOMP
for company code and with different combinations for other requirements also
2007 Aug 28 1:26 PM
hey but i know the existence check bapis......but my point is shall we use instead of select single validation????
2007 Aug 28 1:31 PM
I expect all that the BAPIs are doing is a select single, so if you know the table you need to check you are better doing the select than calling the BAPI.
Regards,
Nick
2007 Aug 28 1:35 PM
Hi,
The code would be:
CALL FUNCTION 'BAPI_COMPANYCODE_GETDETAIL'
EXPORTING
companycodeid = l_bukrs
IMPORTING
COMPANYCODE_DETAIL = ls_comcode_det
COMPANYCODE_ADDRESS = ls_compcode_address
RETURN = ls_ret_msgs
In the code above:
1. l_bukrs is the company code you want to get the details for
2. ls_comcode_det is the Company Code Detail Data whose structure is of type
BAPI0002_2
3. ls_compcode_address is the Company Code Address Data whose structure is
of type BAPI0002_3
4. ls_ret_msgs is the structure for the return messages whose structure is of type
BAPIRETURN.
No commit needed for this as you are just extracting information.
Regards
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |