on 07-18-2007 9:10 AM
Dear,
I want to get purchasing group info by the FM <b>BBP_PD_CTR_GETDETAIL</b> by a contract number, but its return table parameter E_ORGDATA is space.
I am wondering for it. Perhaps you can tell me why or give me a good iead so that I can get purchasing group info(phone, fax, email)by a contract number.because it is for contract managerment function.
thanks a lot.
Alice.
Message was edited by:
Alice Bush
thanks all. it is worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Seems to be problem in your custom source code. Take help of ABAP person here. Otherwise, Please paste your code in the next reply.
<u>Menawhile, please go through the following Sample code -></u>
<u>Sample Code I</u>
DATA: contract LIKE crmd_orderadm_h-object_id.
DATA: lv_ctr_header LIKE bbp_pds_ctr_header_d ,
lt_ctr_conditions TYPE bbpt_pd_cnd_d,
lt_ctr_item LIKE bbp_pds_ctr_item_d OCCURS 0 WITH HEADER LINE,
lt_ctr_partner LIKE bbp_pds_partner OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_object_id = contract
i_with_itemdata = 'X'
IMPORTING
e_header = lv_ctr_header
et_conditions = lt_ctr_conditions
TABLES
e_item = lt_ctr_item
e_partner = lt_ctr_partner.
SORT lt_ctr_item BY number_int.
LOOP AT lt_ctr_item.
CONCATENATE lt_ctr_item-number_int lt_ctr_item-description
INTO selectlist-varoption SEPARATED BY space.
APPEND selectlist.
ENDLOOP.
----
<u>Sample Code II</u>
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_object_id = is_contract_header-object_id
i_with_itemdata = ' '
IMPORTING
e_header = ls_ctr_header
TABLES
e_item = lt_itemlist.
IF ls_ctr_header IS NOT INITIAL.
MOVE-CORRESPONDING is_contract_header TO ls_header.
MOVE ls_ctr_header-guid TO ls_header-guid .
* if contract header is initial or guid is not
* returned pass error message and return
*mapping of the back-end org data to the SRM
IF NOT is_contract_header-be_purch_org IS INITIAL.
*--find local name of this BE-Purch-Org
ls_search_ekorg-ekorg = is_contract_header-be_purch_org.
ls_search_ekorg-logsys = is_contract_header-log_sys.
* map ourch org
CALL FUNCTION 'BBP_OM_READ_PURCH_ORG_ID'
EXPORTING
is_search_ekorg = ls_search_ekorg
IMPORTING
es_purch_org = ls_purch_org
EXCEPTIONS
internal_error = 1
no_authority = 2
nothing_found = 3
OTHERS = 4.
*fill the correspoding details in purchasing organisation
IF sy-subrc EQ 0.
ls_orgdata-proc_org_id = ls_purch_org-objid.
ls_orgdata-proc_org_ot = ls_purch_org-otype.
ENDIF.
ENDIF.
Hope this will help.
Do let me know.
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 Atul,
Could you paste Sample Code 2 some define field?
my idea is this: Get Purchasing group info(name, phone,fax,email) at header level.
this coding in a smartform bbp_contract.
-
tables:
HRP1028,
HRP1032.
Get Purchasing group info(name, phone,fax,email)
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
I_GUID = SF_CTR-HEADER-GUID
I_OBJECT_ID =
I_ATTACH_WITH_DOC = ' '
I_WITH_ITEMDATA = 'X'
I_READ_BE_DATA = ' '
I_DISP_CURRENCY =
I_DISP_DATE =
I_READ_FROM_ARCHIVE = ' '
I_READ_FLAGS =
IMPORTING
E_HEADER =
ET_ATTACH =
ET_CONDITIONS =
TABLES
E_ITEM =
E_PARTNER =
E_LONGTEXT =
E_ORGDATA = LT_ORGDATA
E_MESSAGES =
E_HCF =
E_ICF =
E_ACTVAL =
E_ACC_ACTVAL =
E_HEADER_REL =
E_ITMLIM_REL =
E_TOL =
E_DIS =
E_STATUS =
E_VERSION =
.
*if LT_ORGDATA-PROC_GROUP_ID IS NOT INITIAL.
clear: GS_HRP1028, GS_HRP1032.
loop at LT_ORGDATA into wa_ORGDATA.
if WA_ORGDATA-PROC_GROUP_ID ne space.
to get phone number and fax number
Select * from HRP1028 where PLVAR = '01' and
otype = 'O' and OBJID = WA_ORGDATA-PROC_GROUP_ID(8).
endselect.
move HRP1028 to GS_HRP1028.
to get email address
Select * from HRP1032 where SUBTY = '0010' and
otype = 'O' and OBJID = WA_ORGDATA-PROC_GROUP_ID(8).
endselect.
move HRP1032 to GS_HRP1032.
endif.
endloop.
-
But, this FM return table parameter LT_ORGDATA is space, so that I can't use
WA_ORGDATA-PROC_GROUP_ID to select at two table HRP1028 HRP1032. and other prolbem is where condition is WA_ORGDATA-PROC_GROUP_ID is length(12) and OBJID is 8, how to mapping it?
thanks a lot
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.