Help needs on ADDRESS_UPDATE BAdi.
Hi All,
I need to work in ADDRESS_UPDATE BAdi. Could Pleaze any respond and provide some valuable inputs to complete following requirement.
Validates Zip code and Transportation Zone in LZONE against Zcustom table. If not found Zip code in the Zcustom table. need to raise Error message and stop to save.
Regards,
K.Vinai
Helpul answers will surely rewarded.
Hello Reddy
The BAdI ADDRESS_UPDATE will not be of much help to you because neither method allows you to raise an exception or has some kind of "error message" flag.
However, I guess that the BAdI <b>ADDRESS_CHECK</b> is the one you should go for, in particular its method <b>ADDRESS_POSTAL_CHECK</b>. Errors in the address are obviously returned in CHANGING parameter CH_T_ERROR_TABLE.
Regards
Uwe
Similar Messages
-
Help needed with dramatical bad performanc​e of gauge controls
This VI causes the problems
With kind regards
Martin Kunze
With kind regards
Martin Kunze
KDI Digital Instrumentation.com
e-mail: [email protected]
Tel: +49 (0)441 9490852
Attachments:
Page 1_3D_1.vi 235 KBMartin, listen to CC, the main problem really is overlapping objects (text and digital displays)! The LabVIEW application without overlapping object is 500x faster than yours (See attached, LabVIEW 7.1). I get loop times of below 1ms (>1KHz!) versus your original version with 400-500ms, so LabVIEW can beat your C application by 10x IF you avoid overlapping objects.
(I am using an ancient 1GHz PIII laptop, so the loop times on a modern computer will be much faster)
I agree with Aaron that your property nodes contribute to the problem. After deleting all unecessary property node terminals (they never change!), the only bad one is the constantly variable color scale of the oil pressure. Is this even meaningful to the user? This property write alone costs a few tens of ms(!) so it might be reasonale to either get rid of it completely or update it at a lower rate (In the attached example it happens every 100 iterations, modify as needed (LAbVIEW 7.1)).
If you go back to 200ms loop times, my version will only use a few % of cpu.
Note also that you can do your entire color ramp with 4 elements, six is overkill and just complicates things. I would also get rid of the blinking, it's just too ugly. Use a Red LED to indicate the special condition.
Yes, the performance hit with overlapping objects is surprising, but I am sure there is a good reason and we win elsewhere. It has been my experience that most aspects of LabVIEW are highly optimized under typical conditions (IF properly used!).Message Edited by altenbach on 05-09-2005 01:53 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Page03faster.vi 194 KB -
Help needed in debugging the BADI: BBP_CREATE_REQ_BACk
Hi,
I need help in debugging a BADI which causing an error ' SE142 please enter quantity in line 3000111'.
This happens only when number items in the cart are more than four and only for Service category items for which we have this BADI, if the items were less than or equal to 4, follow on document is created.
Please let me know what could be the error.
Thank you,
Manyam
METHOD if_ex_bbp_create_req_back~fill_req_interface.
Method Parameters:
*LOGICAL_SYSTEM TYPE BBP_BACKEND_DEST-LOG_SYS OPTIONAL
*REQ_ITEMS TYPE BBP_REQ_ITEM_SPOOL
*REQ_ITEM_ACCOUNT TYPE BBP_REQ_ACCT_SPOOL
*REQ_ITEM_TEXT TYPE BBP_REQ_TEXT_SPOOL
*REQ_LIMITS TYPE BBP_REQ_LIMITS_SPOOL
*REQ_CONTRACT_LIMITS TYPE BBP_REQ_LIMITS_CONTR_SPOOL
*REQ_SERVICES TYPE BBP_REQ_SERV_SPOOL
*REQ_SERV_ACCOUNT TYPE BBP_REQ_SERV_ACC_SPOOL
*REQ_SERV_TEXT TYPE BBP_REQ_SERV_TEXT_SPOOL
*REQ_ADDRDELIVERY TYPE BBP_REQ_ADDRDELIVERY_SPOOL
This is the logic to create a Service Requisition based on a service
material group selected in the Shopping Cart. This logic is based on
SAP's standard function SPOOL_RQ_READ_BAPI_EXPORTS from which this
BADI is called.
INSERT FUNCTION SPOOL_RQ_READ_BAPI_EXPORTS TO REPROCESS DATA FOR
SERVICE SPECIAL REQUESTS. -- IOK 07/13/01
*function spool_rq_read_bapi_exports.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(REQNO) LIKE REQHEAD-REQNO
*" VALUE(REQUIS_NUMBER) LIKE BAPIEBANC-PREQ_NO
*" EXPORTING
*" VALUE(SKIP_ITEMS_WITH_ERROR) LIKE BAPIMMPARA-SELECTION
*" VALUE(LOGICAL_SYSTEM) LIKE BBP_BACKEND_DEST-LOG_SYS
*" TABLES
*" REQUISITION_ITEMS STRUCTURE BAPIEBANC
*" REQUISITION_ACCOUNT_ASSIGNMENT STRUCTURE BAPIEBKN
*" REQUISITION_ITEM_TEXT STRUCTURE BAPIEBANTX
*" REQUISITION_LIMITS STRUCTURE BAPIESUHC
*" REQUISITION_CONTRACT_LIMITS STRUCTURE BAPIESUCC
*" REQUISITION_SERVICES STRUCTURE BAPIESLLC
*" REQUISITION_SRV_ACCASS_VALUES STRUCTURE BAPIESKLC
*" RETURN STRUCTURE BAPIRETURN
*" REQUISITION_SERVICES_TEXT STRUCTURE BAPIESLLTX
*" REQUISITION_ADDRDELIVERY STRUCTURE BBPS_RQADDRDELIVERY_46
*" CONTROL_RECORD STRUCTURE BBP_CONTROL_RECORD
*" EXCEPTIONS
*" INTERNAL_ERROR
---- Data Declaration - from LBBP_BS_RQTOP -
- Header -
DATA: reqheader TYPE reqhead.
- Header services -
DATA: reqheaders TYPE reqheads.
- References -
TYPES: reqreferences_type TYPE reqref.
DATA: reqreferences TYPE STANDARD TABLE OF reqreferences_type
INITIAL SIZE 10.
DATA: l_reqreferences TYPE reqreferences_type,
x_reqreferences TYPE reqreferences_type.
- Administrative lines requirement request -
TYPES: reqlines_type TYPE reqline.
DATA: reqlines TYPE STANDARD TABLE OF reqlines_type
INITIAL SIZE 10.
DATA: l_reqlines TYPE reqlines_type.
- MRO-Lines requirement request -
TYPES: reqlinemas_type TYPE reqlinema_eci.
DATA: reqlinemas TYPE STANDARD TABLE OF reqlinemas_type
INITIAL SIZE 10.
DATA: l_reqlinemas TYPE reqlinemas_type.
- SRV-Lines requirement request -
TYPES: reqlinesrs_type TYPE bbps_reqlinesr_eci.
DATA: reqlinesrs TYPE STANDARD TABLE OF reqlinesrs_type
INITIAL SIZE 10.
DATA: l_reqlinesrs TYPE reqlinesrs_type.
- Texts requirement request -
TYPES: reqtexts_type TYPE reqtext.
DATA: reqtexts TYPE STANDARD TABLE OF reqtexts_type
INITIAL SIZE 10.
DATA: l_reqtexts TYPE reqtexts_type.
*- Delivery address
TYPES: reqaddress_type TYPE reqaddress.
DATA: reqaddress TYPE STANDARD TABLE OF reqaddress_type
INITIAL SIZE 10.
DATA: l_reqaddress TYPE reqaddress_type.
- Account assignment requirement request -
TYPES: reqaccts_type TYPE reqacct_470.
DATA: reqaccts TYPE STANDARD TABLE OF reqaccts_type
INITIAL SIZE 10.
DATA: l_reqaccts TYPE reqaccts_type.
- tablekey with the shortlife-line -
DATA: BEGIN OF shortkey,
client TYPE ec_client, "REQLINE-CLIENT,
reqno TYPE ec_reqno, "REQLINE-REQNO,
reqsline TYPE reqsline, "REQLINE-REQSLINE,
reqlline TYPE reqlline, "REQLINE-REQLLINE,
END OF shortkey.
- tablekey with the longlife-line -
DATA: BEGIN OF longkey,
client TYPE ec_client, "REQLINE-CLIENT,
reqno TYPE ec_reqno, "REQLINE-REQNO,
reqlline TYPE reqlline, "REQLINE-REQLLINE,
END OF longkey.
DATA: BEGIN OF bankey,
preq_no TYPE banfn, "BAPIEBAN-PREQ_NO,
preq_item TYPE bnfpo, "BAPIPOGN-PREQ_ITEM,
END OF bankey.
any other working fields
DATA: h_preq_item TYPE bnfpo, "BAPIEBANC-PREQ_ITEM,
h_srv_item TYPE bnfpo, "BAPIEBANC-PREQ_ITEM,
h_logsys TYPE log_system. "reqref-logical_system.
DATA: h_serial_no TYPE dzebkn. "BAPIEBKN-SERIAL_NO.
DATA: h_packno_item TYPE packno, "BAPIESLL-PCKG_NO,
h_packno_srv TYPE packno, "BAPIESLL-PCKG_NO,
h_introw TYPE srv_line_no, "BAPIESLL-LINE_NO,
h_serial_no_srv TYPE dzekkn, "BAPIESKN-SERIAL_NO,
h_srv_outl_created,
next TYPE i,
h_index LIKE sy-tabix,
h_wempf TYPE wempf. "bapiekkn-gr_rcpt.
------ End of std data declaration -
DATA: l_req_items TYPE bapiebanc,
l_req_item_account TYPE bapiebkn,
l_req_item_text TYPE bapiebantx,
l_req_limits TYPE bapiesuhc,
l_req_contract_limits TYPE bapiesucc,
l_req_services TYPE bapiesllc,
l_req_serv_account TYPE bapiesklc,
l_req_serv_text TYPE bapieslltx,
l_req_addrdelivery TYPE bbps_rqaddrdelivery_46.
DATA:
old_req_items TYPE STANDARD TABLE OF bapiebanc,
old_req_item_account TYPE STANDARD TABLE OF bapiebkn,
old_req_item_text TYPE STANDARD TABLE OF bapiebantx,
old_req_limits TYPE STANDARD TABLE OF bapiesuhc,
old_req_contract_limits TYPE STANDARD TABLE OF bapiesucc,
old_req_services TYPE STANDARD TABLE OF bapiesllc,
old_req_serv_account TYPE STANDARD TABLE OF bapiesklc,
old_req_serv_text TYPE STANDARD TABLE OF bapieslltx,
old_req_addrdelivery TYPE STANDARD TABLE OF
bbps_rqaddrdelivery_46.
DATA: l_mat_group TYPE comm_category-category_id.
DATA: f_change_required TYPE c,
f_limit_change TYPE c,
f_mat_sr_change TYPE c,
f_first_change TYPE c VALUE 'X'.
Data declaration for Shopping Cart number and PO number
DATA: reqno TYPE ec_reqno,
requis_number TYPE banfn.
DATA: l_current_item TYPE bnfpo,
line_item(5) TYPE n.
---- Begin Processing ----
DATA: l_requis_number TYPE banfn. "jms 022802
DEBUG TOOL ****** Goto SM50
*data: i type i value 1.
*while i <> 0.
i = i + 1.
*endwhile.
END DEBUG TOOL *******
Get Req Number and Shopping Cart Number
read table req_items into l_req_items index 1.
requis_number = l_req_items-preq_no.
select single reqno
into (reqno)
from reqref
where refnumber = requis_number.
read detailed data from the requirement request
call function 'BBP_REQREQ_GETDETAIL'
EXPORTING
reqno = reqno
IMPORTING
req_header = reqheader
req_header_srv = reqheaders
TABLES
req_reference = reqreferences
req_line = reqlines
req_line_mat = reqlinemas
req_line_srv = reqlinesrs
req_text = reqtexts
req_acct = reqaccts
req_address = reqaddress
EXCEPTIONS
not_found = 1
foreign_lock = 2
no_enqueue_possible = 3
others = 4.
if sy-subrc <> 0.
raise internal_error.
exit.
endif.
Begin JMS
PO_NUM = PO_HEADER-PO_NUMBER.
CMH Data declaration
TYPES: et_header TYPE bbp_pds_sc_header_d.
DATA: t_et_header TYPE STANDARD TABLE OF et_header INITIAL SIZE 0,
x_et_header TYPE et_header.
TYPES: et_item TYPE bbp_pds_sc_item_d.
DATA: t_et_item TYPE STANDARD TABLE OF et_item INITIAL SIZE 0,
x_et_item TYPE et_item.
TYPES: sc_header TYPE bbp_pds_sc_header_d.
DATA: x_sc_header TYPE sc_header.
TYPES: sc_is_pd TYPE xfeld.
DATA: l_sc_is_pd TYPE sc_is_pd.
TYPES: sc_item TYPE bbp_pds_sc_item_d.
DATA: t_sc_item TYPE STANDARD TABLE OF sc_item INITIAL SIZE 0,
x_sc_item TYPE sc_item.
TYPES: sc_account TYPE bbp_pds_acc.
DATA: t_sc_account TYPE STANDARD TABLE OF sc_account INITIAL SIZE 0,
x_sc_account TYPE sc_account.
TYPES: sc_partner TYPE bbp_pds_partner.
DATA: t_sc_partner TYPE STANDARD TABLE OF sc_partner INITIAL SIZE 0,
x_sc_partner TYPE sc_partner.
TYPES: sc_confirm TYPE bbp_pds_con.
DATA: t_sc_confirm TYPE STANDARD TABLE OF sc_confirm INITIAL SIZE 0,
x_sc_confirm TYPE sc_confirm.
TYPES: sc_longtext TYPE bbp_pds_longtext.
DATA: t_sc_longtext TYPE
STANDARD TABLE OF sc_longtext INITIAL SIZE 0,
x_sc_longtext TYPE sc_longtext.
TYPES: sc_limit TYPE bbp_pds_limit.
DATA: t_sc_limit TYPE STANDARD TABLE OF sc_limit INITIAL SIZE 0,
x_sc_limit TYPE sc_limit.
TYPES: sc_orgdata TYPE bbp_pds_org.
DATA: t_sc_orgdata TYPE
STANDARD TABLE OF sc_orgdata INITIAL SIZE 0,
x_sc_orgdata TYPE sc_orgdata.
TYPES: sc_tax TYPE bbp_pds_tax.
DATA: t_sc_tax TYPE STANDARD TABLE OF sc_tax INITIAL SIZE 0,
x_sc_tax TYPE sc_tax.
TYPES: sc_pridoc TYPE bbp_pds_prc.
DATA: t_sc_pridoc TYPE STANDARD TABLE OF sc_pridoc INITIAL SIZE 0,
x_sc_pridoc TYPE sc_pridoc.
TYPES: sc_messages TYPE bbp_pds_messages.
DATA: t_sc_messages TYPE
STANDARD TABLE OF sc_messages INITIAL SIZE 0,
x_sc_messages TYPE sc_messages.
TYPES: sc_actval TYPE bbp_pds_actval.
DATA: t_sc_actval TYPE STANDARD TABLE OF sc_actval INITIAL SIZE 0,
x_sc_actval TYPE sc_actval.
TYPES: sc_acc_actval TYPE bbp_pds_actval.
DATA: t_sc_acc_actval TYPE STANDARD TABLE OF sc_acc_actval
INITIAL SIZE 0,
x_sc_acc_actval TYPE sc_acc_actval.
TYPES: sc_header_rel TYPE bbp_pds_hrel.
DATA: t_sc_header_rel TYPE STANDARD TABLE OF sc_header_rel
INITIAL SIZE 0,
x_sc_header_rel TYPE sc_header_rel.
TYPES: sc_itmlim_rel TYPE bbp_pds_ilrel.
DATA: t_sc_itmlim_rel TYPE STANDARD TABLE OF sc_itmlim_rel
INITIAL SIZE 0,
x_sc_itmlim_rel TYPE sc_itmlim_rel.
TYPES: it_cuf_item_type TYPE bbps_cuf_item.
DATA: t_it_cuf_item TYPE STANDARD TABLE OF it_cuf_item_type
INITIAL SIZE 0,
x_it_cuf_item TYPE it_cuf_item_type.
- Contract limits -
TYPES: reqconlimits_type TYPE reqheads.
DATA: reqconlimits TYPE STANDARD TABLE OF reqconlimits_type
INITIAL SIZE 10.
DATA: l_reqconlimits TYPE reqconlimits_type.
DATA: lv_abort TYPE xfeld,
lv_is_pd TYPE xfeld,
lv_deliv_date LIKE sy-datum,
lv_tabix LIKE sy-tabix,
lv_line TYPE introw,
lv_msarg TYPE char200,
lv_sc_guid TYPE bbp_pdview_iap-header,
lv_req_guid TYPE bbp_pdview_iap-header.
DATA: x_requis_number TYPE bapiebanc.
IF NOT req_items[] IS INITIAL.
CLEAR l_requis_number.
READ TABLE req_items INTO x_requis_number INDEX 1.
l_requis_number = x_requis_number-preq_no.
requis_number = x_requis_number-preq_no.
ENDIF.
Get PO Guid from Backend Table.
SELECT SINGLE guid
INTO lv_req_guid
FROM bbp_pdbei
WHERE be_object_id = l_requis_number
AND be_object_type = 'BUS2105'.
Get Shopping Cart Guid from PO Guid
SELECT SINGLE header
INTO lv_sc_guid
FROM bbp_pdview_iap
WHERE guid = lv_req_guid.
Get detail from shopping cart
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = lv_sc_guid
i_with_itemdata = 'X'
IMPORTING
e_header = x_sc_header
ev_is_pd = l_sc_is_pd
TABLES
e_item = t_sc_item
e_account = t_sc_account
e_partner = t_sc_partner
e_confirm = t_sc_confirm
e_longtext = t_sc_longtext
e_limit = t_sc_limit
e_orgdata = t_sc_orgdata
e_tax = t_sc_tax
e_pridoc = t_sc_pridoc
e_messages = t_sc_messages
e_actval = t_sc_actval
e_acc_actval = t_sc_acc_actval
e_header_rel = t_sc_header_rel
e_itmlim_rel = t_sc_itmlim_rel.
lv_is_pd = l_sc_is_pd.
message handling
IF NOT t_sc_messages[] IS INITIAL.
CALL FUNCTION 'BBP_BS_ADD_MESSAGES'
IMPORTING
ev_abort = lv_abort
TABLES
it_messages = t_sc_messages.
ENDIF.
if error occured set alert/ exception.
IF NOT lv_abort IS INITIAL.
CALL FUNCTION 'BBP_ALERT_SB_LOCAL'
EXPORTING
msgid = 'BBP_PD'
msgno = 280
msgarg1 = lv_msarg
EXCEPTIONS
invalid_parameters = 1
OTHERS = 2.
RAISE internal_error.
ENDIF.
map shopping cart in new structure into old structure to be able
to continue with the old coding
REFRESH t_sc_messages.
CALL FUNCTION 'BBP_SC_MAP_PD_TO_REQ'
EXPORTING
is_new_header = x_sc_header
IMPORTING
es_reqhead = reqheader
es_req_heads = reqheaders
es_cuf_header = is_cuf_header
TABLES
et_req_reference = reqreferences
et_req_line = reqlines
et_req_line_mat = reqlinemas
et_req_line_srv = reqlinesrs
et_req_text = reqtexts
et_req_acct = reqaccts
et_req_address = reqaddress
et_req_conlimit = reqconlimits
it_new_items = t_sc_item
it_account = t_sc_account
it_partner = t_sc_partner
it_longtext = t_sc_longtext
it_limit = t_sc_limit
it_orgdata = t_sc_orgdata
it_tax = t_sc_tax
it_actval = t_sc_actval
it_itmlim_rel = t_sc_itmlim_rel
et_messages = t_sc_messages.
et_cuf_item = it_cuf_item
et_cuf_acc = it_cuf_acc.
IF NOT t_sc_messages[] IS INITIAL.
message handling
CALL FUNCTION 'BBP_BS_ADD_MESSAGES'
IMPORTING
ev_abort = lv_abort
TABLES
it_messages = t_sc_messages.
ENDIF.
if error occured set alert/ exception.
IF NOT lv_abort IS INITIAL.
CALL FUNCTION 'BBP_ALERT_SB_LOCAL'
EXPORTING
msgid = 'BBP_PU'
msgno = 326
msgarg1 = lv_msarg
EXCEPTIONS
invalid_parameters = 1
OTHERS = 2.
RAISE internal_error.
ENDIF.
End insert 03/26/2003
ReqReferences doesn't list the PO item number. We'll need that to
associate the WBS to a Service Sub Item later. Let's put it in.
SORT reqreferences BY client refnumber reqlline.
LOOP AT reqreferences INTO x_reqreferences.
IF x_reqreferences-refline IS INITIAL.
IF l_requis_number = x_reqreferences-refnumber. "jms 022802
ADD 1 TO line_item.
ELSE.
l_requis_number = x_reqreferences-refnumber. "jms 022802
line_item = 1.
ENDIF.
Accumulate the line item
x_reqreferences-refline = line_item.
MODIFY reqreferences FROM x_reqreferences INDEX sy-tabix.
ENDIF.
ENDLOOP.
SORT reqlines BY client reqno reqlline.
SORT reqreferences BY client reqno reqlline counter.
SORT reqlinemas BY client reqno reqsline reqlline.
SORT reqlinesrs BY client reqno reqsline reqlline.
SORT reqaccts BY client reqno reqlline serial_no. " note 359605
CLEAR: h_preq_item.
CLEAR: h_srv_item, h_srv_outl_created,
h_packno_item, h_packno_srv, h_introw.
First, the Shopping Cart number should be extracted from REQREF table
based on the Req number.
take all items with the specific reference number
LOOP AT reqreferences
INTO l_reqreferences "iok 091701
WHERE refnumber EQ requis_number.
if logical_system is initial.
logical_system = l_reqreferences-logical_system.
endif.
MOVE-CORRESPONDING l_reqreferences TO longkey.
read table reqlines with key longkey binary search.
READ TABLE reqlines INTO l_reqlines "iok 091701
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
CHECK sy-subrc EQ 0.
h_preq_item = l_reqlines-reqsline+5(5).
clear h_preq_item.
Change line_type based on Material Group
add code here later.
CLEAR: f_change_required,
f_mat_sr_change,
f_limit_change.
SELECT SINGLE category_id
INTO l_mat_group
FROM comm_category
WHERE category_guid = l_reqlines-category.
Check if Services Special Request
IF l_reqlines-catalogid IS INITIAL AND
l_reqlines-product IS INITIAL AND
l_mat_group(1) = 'S' AND
l_reqlines-line_type = '1'. "Service Special Request
Set flags for future processing
l_reqlines-line_type = '3'.
f_change_required = 'X'.
f_limit_change = 'X'.
Check if Material Special Request
ELSEIF l_reqlines-catalogid IS INITIAL AND
l_reqlines-product IS INITIAL AND
l_mat_group(1) <> 'S' AND
l_reqlines-line_type = '1'. "Material Special Request
Set flags for future processing
f_change_required = 'X'.
f_mat_sr_change = 'X'.
ENDIF.
CHECK f_change_required = 'X'.
For Material Special Requests only need to select and store UNSPSC
code -- iok 092401
IF f_mat_sr_change = 'X'.
Get UNSPSC code (first hit) based on Material Group and store
in text id B05. iok 092101
READ TABLE req_items INTO l_req_items
WITH KEY preq_item = h_preq_item
mat_grp = l_mat_group.
READ TABLE req_item_text INTO l_req_item_text
WITH KEY preq_no = requis_number
preq_item = l_req_items-preq_item
text_id = 'B05'.
IF sy-subrc <> 0.
CLEAR l_req_item_text.
Find a UNSPSC Code from a Material Group .. even it's arbitrary
SELECT unspsc_code UP TO 1 ROWS
FROM zxl8_category_id
INTO l_req_item_text-text_line
WHERE category_id = l_mat_group.
ENDSELECT.
If nothing found then fill in a dummy UNSPSC. The first
letter of the Material will designate whether it's a Material
or Service.
IF sy-subrc NE 0.
Move the Material Group value into a holding variable
CONCATENATE l_mat_group(1) 'XXXXXXXX'
INTO l_req_item_text-text_line.
ENDIF.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B05'.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDIF.
CONTINUE. "to next item.
ENDIF.
IF f_first_change = 'X' AND f_limit_change = 'X'.
Save old P.Req. data and clear tables
old_req_items[] = req_items[].
old_req_item_account[] = req_item_account[].
old_req_item_text[] = req_item_text[].
old_req_limits[] = req_limits[].
old_req_contract_limits[] = req_contract_limits[].
old_req_services[] = req_services[].
old_req_serv_account[] = req_serv_account[].
old_req_serv_text[] = req_serv_text[].
old_req_addrdelivery[] = req_addrdelivery[].
REFRESH: req_items,
req_item_account,
req_item_text,
req_limits,
req_contract_limits,
req_services,
req_serv_account,
req_serv_text.
req_addrdelivery.
CLEAR f_first_change.
ENDIF.
Limit
IF l_reqlines-line_type EQ '3'.
and not reqheaders-limit is initial.
DATA: l_reqreferences_temp TYPE reqreferences_type.
+JMS 2/26/2002
CLEAR l_reqreferences_temp.
READ TABLE reqreferences INTO l_reqreferences_temp
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
IF sy-subrc = 0.
h_preq_item = l_reqreferences_temp-refline.
ENDIF.
CLEAR l_req_items.
READ TABLE old_req_items INTO l_req_items
WITH KEY preq_item = h_preq_item.
MOVE-CORRESPONDING l_req_items TO reqheaders.
reqheaders-begdate = l_req_items-deliv_date.
reqheaders-limit = l_req_items-c_amt_bapi.
reqheaders-exp_value = l_req_items-c_amt_bapi.
reqheaders-gr_ind = 'X'.
reqheaders-reqno = l_req_items-preq_no. "jms 022602
CLEAR l_req_items.
INSERT FORM **** CREATE_SERVICE_ITEM
h_packno_item = h_packno_item + 1.
h_packno_srv = h_packno_srv + 10000.
h_introw = h_introw + 1.
CLEAR l_req_items. " Note 364396
MOVE-CORRESPONDING reqheaders TO l_req_items.
l_req_items-preq_no = reqheaders-reqno. "jms 022602
l_REQ_ITEMS-PREQ_NO = REQUIS_NUMBER. "jms 022602
l_REQ_ITEMS-PREQ_ITEM = H_PREQ_ITEM + 1. "iok 091801
l_req_items-preq_item = h_preq_item. "iok 091801
l_current_item = h_preq_item. "iok 092101
h_srv_item = l_req_items-preq_item.
h_preq_item = h_preq_item + 1.
IF NOT reqheaders-limit IS INITIAL OR
NOT reqheaders-exp_value IS INITIAL.
IF reqheaders-gr_ind IS INITIAL.
l_req_items-item_cat = '1'.
ELSE.
l_req_items-item_cat = '9'.
ENDIF.
l_req_items-deliv_date = reqheaders-begdate.
ELSE.
l_req_items-item_cat = '9'.
ENDIF.
IF l_req_items-del_datcat IS INITIAL.
l_req_items-del_datcat = '1'.
ENDIF.
l_req_items-quantity = 1.
l_req_items-pckg_no = h_packno_item.
IF l_req_items-preq_name EQ space.
l_req_items-preq_name = sy-uname.
ENDIF.
APPEND l_req_items TO req_items.
END OF FORM INSERTION ********
l_req_limits-pckg_no = h_packno_item.
l_req_limits-limit = reqheaders-limit.
l_req_limits-exp_value = reqheaders-exp_value.
l_req_limits-no_limit = reqheaders-no_limit.
l_req_limits-no_frlimit = 'X'.
APPEND l_req_limits TO req_limits.
*.... Account assignment
clear requisition_srv_accass_values.
CLEAR l_req_serv_account.
l_req_serv_account-pckg_no = h_packno_item.
MOVE-CORRESPONDING l_reqlines TO longkey.
read table reqaccts with key longkey binary search. "iok 091801
READ TABLE reqaccts INTO l_reqaccts "iok 091801
WITH KEY client = longkey-client
reqno = longkey-reqno
reqlline = longkey-reqlline
BINARY SEARCH.
IF sy-subrc = 0.
LOOP AT reqaccts
INTO l_reqaccts
WHERE reqno = l_reqreferences-reqno
AND reqlline = l_reqreferences-reqlline.
INSERT FULL FORM *********** FILL_REQ_ACCT_SRV
DATA: acctcomp1 TYPE bapiebkn,
acctcomp2 TYPE bapiebkn,
high_serial TYPE dzekkn. "LIKE BAPIEKKN-SERIAL_NO.
CLEAR l_req_serv_account-serial_no.
CLEAR acctcomp1.
MOVE-CORRESPONDING l_reqaccts TO acctcomp1.
CLEAR: acctcomp1-preq_no,
acctcomp1-preq_item,
acctcomp1-serial_no,
acctcomp1-created_on,
acctcomp1-created_by,
acctcomp1-preq_qty,
acctcomp1-distr_perc,
acctcomp1-change_id,
acctcomp1-currency.
LOOP AT req_item_account INTO l_req_item_account.
CLEAR acctcomp2.
MOVE-CORRESPONDING l_req_item_account TO ACCTCOMP2. "is blank
CLEAR: acctcomp2-preq_no,
acctcomp2-preq_item,
acctcomp2-serial_no,
acctcomp2-created_on,
acctcomp2-created_by,
acctcomp2-preq_qty,
acctcomp2-distr_perc,
acctcomp2-change_id,
acctcomp2-currency.
IF acctcomp1 EQ acctcomp2 AND h_srv_outl_created IS INITIAL.
l_req_serv_account-serial_no = l_req_item_account-serial_no.
EXIT.
ENDIF.
high_serial = l_req_item_account-serial_no.
ENDLOOP.
h_srv_outl_created = ' '.
IF l_req_serv_account-serial_no IS INITIAL.
MOVE-CORRESPONDING l_reqaccts TO l_req_item_account.
l_REQ_item_ACCOUNT-PREQ_NO = REQUIS_NUMBER. "jms 022702
l_req_item_account-preq_no = l_req_items-preq_no."jms 022702
l_req_item_account-preq_item = h_srv_item.
REQUISITION_ACCOUNT_ASSIGNMENT-WBS_ELEM_E = REQACCT-BBP_PROJECT.
l_req_item_account-serial_no = high_serial + 1.
l_req_serv_account-serial_no = l_req_item_account-serial_no.
APPEND l_req_item_account TO req_item_account.
ENDIF.
END OF FORM INSERTION ***********
h_serial_no = h_serial_no + 1.
l_req_serv_account-serno_line = h_serial_no.
l_req_serv_account-percentage = l_reqaccts-distr_perc.
APPEND l_req_serv_account TO req_serv_account.
ENDLOOP.
INSERT FULL FORM **************** CONVERT_ACCOUNT_***_CAT
data: account_tab LIKE bbp_pds_acc OCCURS 0 WITH HEADER LINE.
DATA: account_tab TYPE STANDARD TABLE OF bbp_pds_acc.
DATA: l_account_tab TYPE bbp_pds_acc.
DATA: h_knttp TYPE knttp.
move the accounting data to that item into the interface table
LOOP AT reqaccts
INTO l_reqaccts
WHERE reqno EQ l_reqreferences-reqno
AND reqlline EQ l_reqreferences-reqlline.
MOVE-CORRESPONDING l_reqaccts TO l_account_tab.
APPEND l_account_tab TO account_tab.
ENDLOOP.
call the convert API
CALL FUNCTION 'BBP_ACCCAT_MAP_EXP'
EXPORTING
i_logical_system = logical_system
IMPORTING
e_r3_acc_cat = h_knttp
TABLES
i_pd_account = account_tab.
IF h_knttp IS INITIAL.
h_knttp = 'X'.
ENDIF.
+JMS 2/14/2002 Issue #1590
CLEAR account_tab.
REFRESH account_tab.
account assignment category - set in the correct item
LOOP AT req_items
INTO l_req_items
WHERE preq_item EQ l_req_item_account-preq_item.
l_req_items-acctasscat = h_knttp.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
END OF FORM INSERTION ************
ELSE.
INSERT FULL FORM ************* Form CONVERT_ACCOUNT_***_CAT_U
LOOP AT req_items
INTO l_req_items
WHERE preq_item EQ l_current_item.
l_req_items-acctasscat = 'U'.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
END OF FORM INSERTION ************
ENDIF.
Get UNSPSC code (first hit) based on Material Group and store
in text id B05. iok 092101
READ TABLE req_items INTO l_req_items
WITH KEY preq_item = l_current_item
mat_grp = l_mat_group.
READ TABLE req_item_text INTO l_req_item_text
WITH KEY preq_no = requis_number
preq_item = l_req_items-preq_item
text_id = 'B05'.
IF sy-subrc <> 0.
CLEAR l_req_item_text.
Get UNSPSC Code from Material Group .. even if arbitrary
SELECT unspsc_code UP TO 1 ROWS
FROM zxl8_category_id
INTO l_req_item_text-text_line
WHERE category_id = l_mat_group.
ENDSELECT.
If nothing found then fill in a dummy UNSPSC. The first
letter of the Material will designate whether it's a Material
or Service.
IF sy-subrc NE 0.
Move the Material Group value into a holding variable
CONCATENATE l_mat_group(1) 'XXXXXXX'
INTO l_req_item_text-text_line.
ENDIF.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B05'.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDIF.
Don't send Internal Note to Backend
delete req_item_text where text_id = 'B02'.
Service -- NOT NEEDED -- IOK 07/13/01
elseif not reqlines-reqsline is initial
and reqlines-line_type eq '2'.
move-corresponding reqlines to shortkey.
read table reqlinesrs with key shortkey binary search.
if sy-subrc = 0.
h_serv = reqlinesrs.
append h_serv.
endif.
material item -- NOT NEEDED -- IOK 07/13/01
ENDIF.
ENDLOOP.
Services -- NOT NEED -- IOK 07/13/01
IF f_limit_change = 'X'.
Check multiple account assignment
LOOP AT req_items INTO l_req_items.
h_index = sy-tabix.
CLEAR next.
LOOP AT req_item_account
INTO l_req_item_account
WHERE preq_item EQ l_req_items-preq_item.
next = next + 1.
ENDLOOP.
IF next > 1.
l_req_items-distrib = '2'. "prozentuale Verteilung
l_req_items-part_inv = '1'.
l_req_items-gr_non_val = 'X'.
MODIFY req_items FROM l_req_items INDEX h_index. "217191
modify requisition_items. "217191
ENDIF.
ENDLOOP.
ENDIF.
Remap delivery address for backend processing
LOOP AT req_addrdelivery INTO l_req_addrdelivery.
MOVE: l_req_addrdelivery-name_2 TO l_req_addrdelivery-name,
l_req_addrdelivery-c_o_name TO l_req_addrdelivery-name_2.
CLEAR: l_req_addrdelivery-c_o_name.
MODIFY req_addrdelivery FROM l_req_addrdelivery INDEX sy-tabix.
ENDLOOP.
CHM 07/16/2003 Changed created by to always be actual creator even
for on behalf of situations
LOOP AT req_items
INTO l_req_items.
l_req_items-created_by = x_sc_header-created_by.
MODIFY req_items FROM l_req_items INDEX sy-tabix.
ENDLOOP.
CMH - end change
MA 12/10/04 - Pass MP2 number from Manu Prod# to Req Item Text
LOOP AT req_items INTO l_req_items.
READ TABLE t_sc_item into x_sc_item
WITH KEY number_int = l_req_items-preq_item.
l_req_item_text-preq_no = requis_number.
l_req_item_text-preq_item = l_req_items-preq_item.
l_req_item_text-text_id = 'B06'.
l_req_item_text-text_line = x_sc_item-manu_prod.
INSERT l_req_item_text INTO TABLE req_item_text.
ENDLOOP.
ENDMETHOD.Any help guys?
Thanks
Manyam -
I have an iphone 4, with ios 4.3.3. I want to update it but when I connect it to itunes it says that it is the latest version of the software. So I cannot update it, and I need it very bad. Can anyone help me?
What version of iTunes do you have installed? If you are trying to update to iOS 6 you need iTunes 10.7 or later.
-
Urgent Help needed - BADI's in Infospoke
Hi,
My Scenario:
I am pulling data from master data using infospoke into Application server. I need some kind of easy transformations during this stage.
I got ZSTATE field in my data and I need to restrict my output to only certain states(Ex: NJ,CA, TX , MNetc). Since I can't give those selection conditions in infospoke I need to try BADI. I created a BADI and have target and source structure. Can anyone write me small code for this to eliminate other states and allow NJ , CA, MN, TX etc.
Source structure: /BIC/CYZZTEST
target Structure: /BIC/CZZZTEST
infospoke: ZZTEST
Field: Zstate
Class:ZCL_IM_ZZTEST
Method:IF_EX_OPENHUB_TRANSFORM~TRANSFORM
Full points to helpful answer!!
Anil.The problem is cross user too - I have two user files on the machine and the same thing happens regardless of which user file I'm working in.
That points to s 'system-wide' issue.
Try resetting your SMC.
Resetting the System Management Controller >>
Also, you could try booting from your install DVD and see if it does it there. If it does not, it's more than likely a software issue and an Archive and Install should fix it.
Mac OS X: About the Archive and Install feature >>
-Bmer
Mac Owners Support Group - Join us @ MacOSG.com
Mac611 Mobile Mac Support - about.Mac611.com
iTunes:MacOSG Podcast | YouTube.MacOSG.com
An Apple User Group
Have an iPhone or iPod touch? Enter Mac611.com in Safari on it for 'mobile Mac support.' -
Help need for badi method me_process_po_cust~check
Dear All expert
Pl see following thread
I am stuck
Help needed
http://scn.sap.com/thread/3610303See the issue here is HOLD feature in PO should not be there if it meets the error condition.
For this you can refer another BADI for this purpose ME_HOLD_PO.
Refer one of my previous threads below , it might be helpful :
Held Purchase order need not be created.
Reiterating a thread related to same topic is not a good practice. -
Help needed in PS module on CJ9ECP/CJ20N for revaluating CCR??
help needed in PS module on CJ9ECP/CJ20N for revaluating CCR??
How to handle method on_costing_component_to_outtab which belongs to badi gui_itemization_ck. This is to revaluate CCR in CJ20N.
From sale transaction(va01/va02) i need to call cj20n/cj9ecp for revaluating cost estimates. Can anyone say how to proceed with this thing.
Can any one say how to handle pop up window in CJ20N/CJ9ECP when clicked edit ecp button. Later how to revaluate cost estimates. For this should i need to go for call transaction or is there any method available. If so how to handle method for revaluating cost estimates for ECP of WBS elementsThanks Amol for the advice.
My friend doesn't belong to an engineering background and had not worked in a manufacturing environment.
He holds an MBA degree specialised in systems and has worked in software companies supporting software projects and the functions(like HR,Procurement in the same setup) as a software quality guy.
Moreover the modules mentioned by you requires engineering background with manufacturing exposure.
He had enquired for the course at siemens and they said that he may not be suitable for any of the modules offered by them as per the above reasons.They also mentioned that they have to check with SAP Labs for expert opinion.
Please provide your inputs.
regards,
Zubair. -
Help needed. I have a 3TB external hard drive partitioned into 1TB's. I used one partition as backup for the main computer hard drive. But now it is greyed out as shown in the disk utility and its name changed, i dont know how that happened, i tried verifying and repairing it but had no luck. I also tried mounting and unmounting it but still no solution. Anyone to help please?
Looks bad. I would strongly advise backing up the stuff on the other two partitions as soon as possible in case the rest of the drive goes wrong.
Beyond that, Disk Utility has limited abilities to repair disks, DiskWarrior uses a different approach and might, emphasis might be more successful. It has certainly done the job for me in the past when Disk Utility could not.
See http://www.alsoft.com/diskwarrior/ -
help needed with itunes please tryed to move my itunes libary to my external hard drive itunes move ok and runs fin but i have none of my music or apps or anything all my stuff is in the itunes folder on my external hard drive but there is nothing on ituns how do i get it back help,please
(Make sure the Music (top left) library is selected before beginning this.)
If you have bad song links in your library, hilite them and hit the delete button. Then locate the folder(s) where your music is located and drag and drop into the large library window in iTunes ( where your tracks show up). This will force the tunes into iTunes. Before you start, check your preferences in iTunes specifically under the"Advanced" tab, general settings. I prefer that the 1st 2 boxes are unchecked. (Keep iTunes Music folder organized & Copy files to iTunes Music folder when adding to library). They are designed to let iTunes manage your library. I prefer to manage it myself. Suit yourself. If there is a way for iTunes to restore broken links other than locating one song at a time I haven't found it yet. (I wish Apple would fix this, as I have used that feature in other apps.) This is the way I do it and I have approx. 25,000 songs and podcasts and videos at present. Hope this helps. -
Urgent help needed to get this home page up!
Hi,
I need urgent help with this and it is driving me crazy. For
some reason my animation starts at its fastest and won't stop until
you click the area then it works properly. I have no clue why it is
doing this and only seems to do it on a PC browser not on a Mac.
Can anyone help please!!!!!
Link to sample:
http://www.totalamber.com/test.html
Link to fla:
http://www.totalamber.com/flash/homepage.fla
Thanks so much for anyone who can help or tries to help me.
Neil
Ps this is urgent and i can't find a solution by searching on
hereThanks to anyone who has looked at this but i have found the
answer.
It is due to what many of the users on here will already know
and can be explained in this link:
http://blog.deconcept.com/swfobject/
I had forgot about the legal patent going on with microsoft!
Hope it helps anyone else as bad as i am.
Neil -
Twitter API help needed immediately
I have developed a twitter API in Flash Professional CS4. It works fine when it plays in the flash player locally. But when I publish the file and play it in a browser it asks for settings to be modified. Since those were the local settings I have modified them and played the file in browser and it worked fine.
Now, when I upload the file to server and embed the swf into a html file and try to play it from the server nothing happens. The API doesn't load the feeds from twitter site. The display is always blank. http://sravan313.inz.cc/home.html
Possible solutions I have tried.....
added security code in flash
1st method:
flash.system.Security.allowDomain("*");
flash.system.Security.loadPolicyFile("http://twitter.com/crossdomain.xml");
2nd method:
added the crossdomain.xml policy file from http://twitter.com/crossdomain.xml
3rd method:
followed any of the above methods along with changing the "Access network only" in publish settings.
Can anyone help me with possible solutions???
guys its very urgent!!! I need help immediately.....Hi Peter
so, what do you really suggest? Can you help me regarding this
? I need this very badly and little bit urgently.... any suggestions
are appreciated.
and Darshan,
Thanks, a lot. Your links were very helpful. Could understand a little bit better about cross domains. -
hi,
I Need BAPI and BADi Doc.
Please send doc to my mail id
[email protected]
thanks in advance
sarathBAPI.............
Business add-ins are enhancements to the standard version of the system.
Business Add-In is a new SAP enhancement technique based on ABAP Objects.
They can be inserted into the SAP system based on specific user requirements.
Each Business Add-In has:
at least one Business Add-In definition
a Business Add-In interface
a Business Add-In class that implements the interface
In order to enhance a program, a Business Add-In must first be defined
Subsequently two classes are automatically generated:
An interface with IF_EX_ inserted between the first and second characters of the BADI name.
An adapter class with CL_EX_ inserted between the first and second characters of the BADI name.
The Application developer creates an interface for this Add-In.
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
Have a look at http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
How to develop BADI
BADI................
There is nothing enigmatic or complicated about BAdIs. BAdIs are the most up-do-date technique of user-exits where SAP allows us to adjust a standard process to customer-specific requirements. Important: these user-exits are predefined by SAP.
The really challenging task is to find the appropriate BAdI (transaction SE18). If you have found the right one implementation is just a piece of cake:
(1) Define an implementation of your BAdI (transaction SE19) => This simply means: I am about to implement this BAdI.
(2) Generate automatically the class implementing the BAdI (which is usually an interface) (transaction SE19).
(3) Implement the method of this generated class (transaction SE24).
(4) Finally, do not forget to activate your implementation (SE19).
/people/sergey.korolev/blog/2005/03/14/the-time-for-me-to-have-a-badi-of-my-own
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
http://www.esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework -
I need Navigation of Badi and Bapi
I need Navigation of Badi and Bapi clearly
For BADI
goto SE18 tcode and search for the respective BADI
come to SE19 and implement it and use it
BAPI's use the Tcode BAPI only to find the Module based application level BAPI's
Even you can search for the BAPI's from SE37
and call these bapis in code similar to Fun modules like CALL FUNCTION <BAPI name>
see the doc
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
BAPI
what is BAPI?
BAPI stands for Business API(Application Program Interface).
A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
You can make your function module remotely enabled in attributes of Function module but
A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
The following standardized BAPIs are provided:
Reading instances of SAP business objects
GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
The BAPI GetList() is a class method.
GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
Create( ) and CreateFromData! ( )
The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
Change( )
The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
BAPI-step by step
http://www.sapgenie.com/abap/bapi/example.htm
just refer to the link below
http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
list of all bapis
http://www.planetsap.com/LIST_ALL_BAPIs.htm
for BAPI's
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://www.planetsap.com/Bapi_main_page.htm
http://www.topxml.com/sap/sap_idoc_xml.asp
http://www.sapdevelopment.co.uk/
http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
Also refer to the following links..
www.sap-img.com/bapi.htm
www.sap-img.com/abap/bapi-conventions.htm
www.planetsap.com/Bapi_main_page.htm
www.sapgenie.com/abap/bapi/index.htm
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
Example Code
U need to give the step_nr, item_nr, cond_count and cond_type so the correct conditon will be updated. If no condition exists for the given parameters, a new condition will be created.
U can find these parameters for a particular condition type in table KONV.
*& Form saveTransactionJOCR
text
--> p1 text
<-- p2 text
FORM saveTransactionJOCR .
data: salesdocument like BAPIVBELN-VBELN,
order_header_inx like bapisdh1x,
order_header_in like bapisdh1,
return type standard table of bapiret2 with header line,
conditions_in type standard table of bapicond with header line,
conditions_inx type standard table of bapicondx with header line,
logic_switch like BAPISDLS,
step_nr like conditions_in-cond_st_no,
item_nr like conditions_in-itm_number,
cond_count like conditions_in-cond_count,
cond_type like conditions_in-cond_type.
salesdocument = wa_order_information-VBELN.
LOGIC_SWITCH-COND_HANDL = 'X'.
order_header_inx-updateflag = 'U'.
conditions
clear conditions_in[].
clear conditions_inx[].
clear: step_nr,
item_nr,
cond_count,
cond_type.
step_nr = '710'.
item_nr = '000000'.
cond_count = '01'.
cond_type = 'ZCP2'.
CONDITIONS_IN-ITM_NUMBER = item_nr.
conditions_in-cond_st_no = step_nr.
CONDITIONS_IN-COND_COUNT = cond_count.
CONDITIONS_IN-COND_TYPE = cond_type.
CONDITIONS_IN-COND_VALUE = 666.
CONDITIONS_IN-CURRENCY = 'EUR'.
append conditions_in.
CONDITIONS_INX-ITM_NUMBER = item_nr.
conditions_inx-cond_st_no = step_nr.
CONDITIONS_INX-COND_COUNT = cond_count.
CONDITIONS_INX-COND_TYPE = cond_type.
CONDITIONS_INX-UPDATEFLAG = 'U'.
CONDITIONS_INX-COND_VALUE = 'X'.
CONDITIONS_INX-CURRENCY = 'X'.
append conditions_inx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = salesdocument
ORDER_HEADER_IN = order_header_in
ORDER_HEADER_INX = order_header_inx
LOGIC_SWITCH = logic_switch
TABLES
RETURN = return
CONDITIONS_IN = conditions_in
CONDITIONS_INX = conditions_inx
if return-type ne 'E'.
commit work and wait.
endif.
ENDFORM. " saveTransactionJOCR
Bdc to Bapi
The steps to be followed are :
1. Find out the relevant BAPI (BAPI_SALESORDER_CHANGE for VA02).
[for VA01 use BAPI_SALESORDER_CREATEFROMDAT2]
2. Create a Z program and call the BAPi (same as a Funtion module call).
2. Now, if you see this BAPi, it has
-> Importing structures.
eg: SALESDOCUMENT: this will take the Sales order header data as input.
-> Tables parameters:
eg: ORDER_ITEM_IN: this will take the line item data as input.
Note :
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
Example
1. Delete the whole order
2. Delete order items
3. Change the order
4. Change the configuration
Notes
1. Minimum entry:
You must enter the order number in the SALESDOCUMENT structure.
You must always enter key fields for changes.
You must always specify the update indicator in the ORDER_HEADER_INX.
2. Commit control:
The BAPI does not run a database Commit, which means that the application must trigger the Commit so that the changes are read to the database. To do this, use the BAPI_TRANSACTION_COMMIT BAPI.
For further details... refer to the Function Module documentation for the BAPi.
Bapi to VB(Visual Basic)
Long back I had used the following flow structure to acheive the same.
Report -> SM59 RFC destination -> COM4ABAP -> VB.exe
my report uses the rfc destination to create a COM session with com4abap. com4abap calls the vb.exe and manages the flow of data between sap and vb exe.
You need to have com4abap.exe
If com4abap is installed you will find it in sapgui installatin directory , C:\Program Files\SAPpc\sapgui\RFCSDK\com4abap.
else refer OSS note 419822 for installation of com4abap
after making the settings in com4abap to point to the vb program and setting up rfc destination in sm59 to point to com4abap session , you can use the following function modules to call the vb code.
for setting up com4abap and rfc destination please refer to the documentation for com4abap.
Invoke NEW DCOM session
call function 'BEGIN_COM_SESSION'
exporting
service_dest = service_dest "(this will be a RFC destination created in SM59)
importing
worker_dest = worker_dest
exceptions
connect_to_dcom_service_failed = 1
connect_to_dcom_worker_failed = 2
others = 3.
call function 'create_com_instance' destination worker_dest
exporting
clsid = g_c_clsid
typelib = g_c_typelib
importing
instid = g_f_oid
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
call function 'com_invoke' destination worker_dest
exporting
%instid = g_f_oid
%method = 'UpdatePDF'
sntemp = g_v_const_filent
snsysid = sy-sysid
snflag = 'N'
tables
rssaptable = g_t_pdfdetail1
%return = g_t_pdfdetail1 "t_test
exceptions
communication_failure = 1 message g_f_msg
system_failure = 2 message g_f_msg
invalid_instance_id = 3
others = 4.
then close the com session , using
FM delete_com_instance
FM END_COM_SESSION
Regards
Anji -
Troubleshooting help needed: My iMac keeps crashing and restarting with a notice: "Spinlock application timed out" What can I do?
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Console in the page that opens.
Select the most recent panic log under System Diagnostic Reports. Post the contents — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports. -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say.
Maybe you are looking for
-
Regarding entry of Item master opening balance
Suppose i have 20 number of 'X' items with price 100 and i have 30 number of same 'X' items with price 300 in this case how to enter opening balance and price for this item from Inventory>inventory transactions>item opeing balances?? awaiting for yo
-
Can't find the correct driver for my printer.
Hey, I just recently moved, and was trying to set up my computer to be connected to my printer/scanner again. It has been many months since i last used this desktop computer, and when i tried to connect my printer, i couldn't find the right driver. S
-
Help ! OM Infotype Update Error
We were trying to update the OM infotype using the RH_UPDATE_INFTY function module. But we are getting an exceptional error - 'ERROR DURING UPDATE'. Please help us on this. The process which we used is.. Select the existing infotype record (IT 1029)
-
Cant edit playlist on my ipod touch
When I try to move songs around in my playlist on my ipod touch they will not move, why?
-
Hi, CS3 PPro, importing JPGs often results in a blacked out file, but when re-opened in Corel PPT it is fine. deleting it and re-importing results in same problem. When placed in timeline, it remains black. Have played with adding Color mask, but