on 04-11-2007 7:09 AM
Hi All,
Im working on the conversion program for AVL using the following function modules
BBP_PD_AVL_GETLIST
BBP_PD_AVL_CREATE
BBP_PD_AVL_UPDATE
BBP_PD_AVL_SAVE
In the function module BBP_PD_AVL_CREATE , Im trying to build the table for I_HEADER and I_ORGDATA but it keeps throwing me the error organization at the header level not found. Im not sure whether Im passing the right parameters especially the GUID for I_ORGDATA and I_HEADER. Can any one help me with these please.
Any valuable suggestions will be appreciated and rewarded.
Regards,
Manikandan R
Hi
Please paste your code here for better analysis.
Here is some sample code.
INCLUDE bbp_pd_con_cl.
DATA: ls_pd_header_c TYPE bbp_pds_avl_header_ic,
ls_pd_header_d TYPE bbp_pds_avl_header_d,
* lti_partner TYPE bbpt_pds_partner,
lt_partner TYPE bbpt_pds_partner,
ls_partner TYPE bbp_pds_partner,
lti_orgdata TYPE bbpt_pds_org,
lte_orgdata TYPE bbpt_pds_org,
ls_por_u TYPE bbps_purch_org_u.
DATA lti_item TYPE bbpt_pd_avl_item_icu.
DATA lte_item TYPE bbpt_pd_avl_item_d.
*-----------------------------------------------------------------------
*-----------------------------------------------------------------------
* import: map header
MOVE-CORRESPONDING is_cl_header_c TO ls_pd_header_c.
map_header_cl_to_pd( EXPORTING is_cl_header_c = is_cl_header_c
IMPORTING es_pd_header_c = ls_pd_header_c ).
*-----------------------------------------------------------------------
* import: map responsible purchasing organization
MOVE-CORRESPONDING is_por_c TO ls_por_u.
ls_por_u-p_guid = ls_pd_header_c-guid.
map_por_cl_to_pd( EXPORTING is_por_u = ls_por_u
IMPORTING et_pd_org = lti_orgdata ).
*-----------------------------------------------------------------------
* import: map call of purchasing organization
lt_partner[] = it_partner[].
*-----------------------------------------------------------------------
* import: map items
lti_item[] = it_item[].
*-----------------------------------------------------------------------
* ordering party for marketset scenario
DATA: lv_marketset TYPE bbp_marketset.
CALL FUNCTION 'BBP_MS_C_SELECT_STATUS_GET'
IMPORTING
ev_marketset = lv_marketset.
IF lv_marketset = true.
DATA: ls_ord_party TYPE bbp_pds_partner_get.
CALL FUNCTION 'BBP_OM_DETERMINE_COMPANY'
EXPORTING
i_user_id = sy-uname
IMPORTING
e_partners = ls_ord_party
EXCEPTIONS
no_company_found = 1
attribute_company_not_found = 2
no_partner_function_found = 3
no_business_partner_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
CALL FUNCTION 'BBP_PD_MSG_ADD'
EXPORTING
i_msgty = c_msgty_e
i_msgid = 'BBP_PD'
i_msgno = '261'
EXCEPTIONS
log_not_found = 1
OTHERS = 2.
EXIT.
ENDIF.
MOVE-CORRESPONDING ls_ord_party TO ls_partner.
set_guid ls_partner-partner_guid.
ls_partner-p_guid = ls_pd_header_c-guid.
APPEND ls_partner TO lt_partner.
ENDIF.
*-----------------------------------------------------------------------
CALL FUNCTION 'BBP_PD_AVL_CREATE'
EXPORTING
* I_PARK =
* I_SAVE =
* I_TESTRUN =
i_header = ls_pd_header_c
IMPORTING
e_header = ls_pd_header_d
TABLES
i_item = lti_item
i_partner = lt_partner
i_orgdata = lti_orgdata
e_item = lte_item
e_partner = et_partner
e_orgdata = lte_orgdata
e_status = et_status
e_messages = et_message.
* check error
IF message_abort_check( et_message ) = true.
EXIT.
ENDIF.
Hope it will help.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check if you have maintained I_ORGDATA table correctly.
Fields PROC_ORG, PROC_GROUP etc. must have following values:
O<space><numer_of_procurement_org> for example "O 50001133".
You may check this fields in table BBP_PDORG or in transaction BBP_PD.
Regards,
Marcin Gajewski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.