Update EKPO-MFRPN using BADI
Hi everyone.
I'd like to update 'EKPO-MFRPN' using me_process_po_cust.
Method is PROCESS_ITEM.
<cording>
data: ls_mepoitem TYPE mepoitem.
ls_mepoitem = im_item->get_data( ).
ls_mepoitem-mfrpn = '000000001'.
im_item->set_data( ls_mepoitem ).
But, MFRPN wasn't update by BADI, this value of Material Master's MFRPN
transfer to EKPO-MFRPN.
If MFRPN could be updated by BADI, coud you tell me how to update MFRPN.
Soma
Hi,
Make internal table for that and store that data into dbtabe through insert query and commited it then it will work.
Rewards points if it is useful.
Similar Messages
-
Updating Z table using BADI CUSTOMER_ADD_DATA_CS
Good morning guys,
I need to update some tables Z through some information that I put in a new tab. The problem is I do not know which method I should use.
If anyone can help me I appreciate it.Lucas,
Just a thought -- BADI CUSTOMER_ADD_DATA_CS seems to be more at a screen flow level. Need caution while updating Z table here.
I would recommend using BADI CUSTOMER_ADD_DATA-CHECK_ALL_DATA/SAVE_DATA methods.
Method CHECK_ALL_DATA will be executed right before saving and has access to all tables which are ready to be updated. Final validations before updating Z tables can be performed here. Develop a FM to update Z table and call it in an UPDATE TASK in this method.
Thanks,
VM. -
Problem with sales order update from MIGO ( using BADI)
I have written a BADI while doing MIGO, through which I am updating Sales order Order Quanity.
I am able to update the Quantity successfully in sales order, but I am getting following update termination message which is mentioned below.
"Sales Order 376446 has failed an update to the billing date associated to Transaction MIGO
Contact your STC Key user for assistance
PO Number:"
Any clue? Please suggest.
Regards,
Krishna Prasad MVNI have written a BADI while doing MIGO, through which I am updating Sales order Order Quanity.
I am able to update the Quantity successfully in sales order, but I am getting following update termination message which is mentioned below.
"Sales Order 376446 has failed an update to the billing date associated to Transaction MIGO
Contact your STC Key user for assistance
PO Number:"
Any clue? Please suggest.
Regards,
Krishna Prasad MVN -
ESS Leave Custom fields, how to update them using BADIs
Hi There,
We are trying to use custom fields provided in ESS leave application, and we want to update them using BADI. As these information is not available on the screen while requesting leave request.
I did look at PT_ABS_REQ BADI and seems i can use Post_Vio_BLOP .. but its unable to update table PTREQ_ATTABSDATA .
Can you please suggest what can be best approach here.
Thanks a lot.
Rgds,Sudhir wrote:>
> I did look at PT_ABS_REQ BADI and seems i can use Post_Vio_BLOP .. but its unable to update table PTREQ_ATTABSDATA .
Did you look at using the Implict Enhancement Options available at the beginning & end of the POST_VIA_BLOP Method? Or even better, enhance the Class CL_PT_ARQ_REQ_EXIT & replace the IF_EX_PT_ABS_REQ~POST_VIA_BLOP Method with an Overwrite Exit?
~Suresh -
I need to update EKPO-NETPR thru me32L transaction
hi,
i need to update EKPO-NETPR thru me32L transaction.
In me32L if i give the scheduling agreement number->then select the particular item->select the item condition button->selecting validity period->updating the amount field in KONP-KBETR manually then the EKPO-NETPR is getting updated.
where as if i try thru BDC its not getting.
pls suggest me the solution.
thanksHi
Its been answered in this thread checkout for badi here badi for me21n tcode
A few other also here
BBP_ME_CREATE_PO_ITEM_40B
EXIT_SAPLMCP2_008
EXIT_SAPLMCP2_009
ME_CREATE_PO_ITEM
Reward if useful
Regards
Divya -
Hi All,
I have added custom screen with two z fields at item level using BADI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST i can see my screen in tcodes ME21N , ME22N , ME23N but I am not able to save data.
and also screen is coming in change mode even in ME23N .
thanks.Hi,
I have added two xfields at item level.
This is the code i have added in zimplementation ZME_GUI_PO_CUST .
IN Zimplementation ME_PROCESS_PO_CUST I have added code only in method FIELDSELECTION_ITEM . after doing this I can see only screens in ME21N, ME22N, ME23N but when enter data in zfields and trying to save it is giving me message no data has changed.
method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE.
DATA: ls_subscriber LIKE LINE OF re_subscribers.
we want to add a customer subscreen on the item detail tab
CHECK im_application = 'PO'.
CHECK im_element = 'ITEM'.
each line in re_subscribers generates a subscreen. We add one subscreen in this example
CLEAR re_subscribers[].
the name is a unique identifier for the subscreen and defined in this class definition
ls_subscriber-name = subscreen1.
the dynpro number to use
ls_subscriber-dynpro = '0001'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLYMEPOBADIEX'.
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'.
a label can be defined
ls_subscriber-label = text-001.
the position within the tabstrib can be defined
ls_subscriber-position = 4.
the height of the screen can be defined here. Currently we suport two screen sizes:
value <= 7 a sevel line subscreen
value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
ENDIF.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL.
DATA: l_item TYPE REF TO if_purchase_order_item_mm,
ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl.
system asks to transport data from the business logic into the view
CASE im_name.
WHEN subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast l_item im_model.
CHECK NOT l_item IS INITIAL.
transport standard fields
ls_mepoitem = l_item->get_data( ).
transport customer fields
CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
EXPORTING
im_ebeln = ls_mepoitem-ebeln
im_ebelp = ls_mepoitem-ebelp
IMPORTING
ex_data = ls_customer.
store info for later use
MOVE-CORRESPONDING ls_mepoitem TO dynp_data_pbo.
MOVE ls_customer-badi_bsgru TO dynp_data_pbo-badi_bsgru.
MOVE ls_customer-badi_afnam TO dynp_data_pbo-badi_afnam.
WHEN OTHERS.
ENDCASE.
endif.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP.
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'YMEPOBADIEX_PUSH'
EXPORTING
im_dynp_data = dynp_data_pbo.
WHEN OTHERS.
ENDCASE.
ENDIF.
endmethod.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP.
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'YMEPOBADIEX_POP'
IMPORTING
ex_dynp_data = dynp_data_pai.
IF dynp_data_pai NE dynp_data_pbo.
something has changed therefor we have to notify the framework
to transport data to the model
re_changed = mmpur_yes.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDIF.
endmethod.
method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL.
DATA: l_item TYPE REF TO if_purchase_order_item_mm,
ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl.
data have to be transported to business logic
CASE im_name.
WHEN subscreen1.
is it an item? im_model can be header or item.
mmpur_dynamic_cast l_item im_model.
CHECK NOT l_item IS INITIAL.
ls_mepoitem = l_item->get_data( ).
standard fields changed?
IF dynp_data_pbo-matkl NE dynp_data_pai-matkl OR
dynp_data_pbo-plifz NE dynp_data_pai-plifz OR
dynp_data_pbo-webaz NE dynp_data_pai-webaz.
update standard fields
ls_mepoitem-matkl = dynp_data_pai-matkl.
ls_mepoitem-plifz = dynp_data_pai-plifz.
ls_mepoitem-webaz = dynp_data_pai-webaz.
CALL METHOD l_item->set_data( ls_mepoitem ).
ENDIF.
CALL FUNCTION 'YMEPOBADIEX_GET_DATA'
EXPORTING
im_ebeln = ls_mepoitem-ebeln
im_ebelp = ls_mepoitem-ebelp
IMPORTING
ex_data = ls_customer.
ls_customer-badi_bsgru = dynp_data_pai-badi_bsgru.
ls_customer-badi_afnam = dynp_data_pai-badi_afnam.
CALL FUNCTION 'YMEPOBADIEX_SET_DATA'
EXPORTING
im_data = ls_customer.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDIF.
method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM.
DATA: l_persistent TYPE mmpur_bool.
CONSTANTS:
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
l_persistent = im_item->is_persistent( ).
*IF l_persistent EQ mmpur_yes.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
metafield = MMMFD_YYMAN_NUM."fd_cust_01.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY
metafield = MMMFD_YYMAN_DES."fd_cust_01.
IF sy-subrc IS INITIAL.
<fs>-fieldstatus = '*'. " Display <-- this one was as per the sample code given.
<fs>-fieldstatus = '+'. " Input <-- this i added to make the field mandatory.
ENDIF.
*ENDIF.
ENDIF.
endmethod. -
How to Update crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module
Hi
How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
data: lt_doc_flow TYPE crmt_doc_flow_wrkt,
lw_cust_h_com TYPE crmt_customer_h_com,
lw_input_field_names TYPE crmt_input_field_names,
lt_input_field_names TYPE crmt_input_field_names_tab,
lt_objects_to_save TYPE crmt_object_guid_tab,
lw_guid TYPE CRMT_OBJECT_GUID.
DATA : lv_process_type TYPE crmt_process_type.
data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
data: wa_customer_h type crmd_customer_h.
* Function module for retriving the Process type.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
EXPORTING
iv_orderadm_h_guid = iv_header_guid
IMPORTING
ev_process_type = lv_process_type
EXCEPTIONS
admin_header_not_found = 1
OTHERS = 2.
if lv_process_type eq 'ZG01'.
CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
EXPORTING
IV_HEADER_GUID = iv_header_guid
IMPORTING
ET_DOC_FLOW_WRK = lt_doc_flow.
read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
if sy-subrc eq 0. "set flag for service order
lw_cust_h_com-ref_guid = wa_doc_flow-objkey_a.
lw_cust_h_com-ZZTRAIL_FLAG = 'X'.
lw_cust_h_com-mode = 'A'.
lw_cust_h_com-ref_handle = '0000000001'.
lw_guid = wa_doc_flow-objkey_a.
INSERT lw_guid INTO TABLE lt_objects_to_save.
endif.
lw_input_field_names-fieldname = 'REF_GUID'.
lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
lw_input_field_names-changeable = ' '.
INSERT lw_input_field_names INTO TABLE lt_input_field_names.
Maintain Customer H
CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
EXPORTING
is_customer_h_com = lw_cust_h_com
CHANGING
ct_input_field_names = lt_input_field_names
EXCEPTIONS
header_change_error = 1
header_create_error = 2
error_occurred = 3.
ENDIF.
*endif.
*Clearing local variables
clear: lv_process_type,
lw_cust_h_com,
lw_input_field_names.
*Free internal tables
free: lt_doc_flow,
lt_input_field_names.Hi Faisal
I think your not clear with what i am saying anyhow i will again explain you my requirement
As per my requirement
1)in the service order search report i need to add a field called "Has trail order with No Follow up" with values "Yes" & "Blank"
For above Field i added using the structure CRMST_QUERY_SRVO_BTIL and through configuration i am able to display the field in webui as per (Attachement Pic 1)
2)When i search with search criteria as "Has trail order with No Follow up" with "Yes"
Then in result list i need to show the service order those having follow up as trail orders(sales order) only.if for next document trail order having any follow up then those service orders dont want to show in result list.
For above requirement i implemented F.M using CRMV_EVENT & I configured for BUS2000115 And BEFORE_SAVE The Order
The FM Will get trigger when i save the service order and for that service order if create any follow up and try to save the trail order then This FM Will trigger and in this i am doing validations.
3)Add one AET Trail Flag field is added under CUSTOMER_H Table.
4)in the FM I am validating for if the trail order having the preceding document as service order then i need to make flag as "X" For that service order in customer_h
if suppose when i delete trail order from the service order then that flag must need to be "unset" from the CUSTOMER_H.
Why bcoz we are doing above process is do show records in result list based on Flag values
these flag checks are validating in the BADI Which we implemented for search logic.
Please refer below Login for my requirement:-
Proposal to have a custom “flag” field (background at table level,
crmd_customer_h) linked to service order which gets flagged whenever at
least one Trial order is created and saved from the Service Order.
The flag value should be cleared when all the trial orders created and
saved as follow up transactions are deleted from the system.
Similarly for Trial Orders will use the same custom “flag” field
which gets activated when at least one follow up is created and saved from Trial Order.
The flag value should be cleared when all the follow up transactions from
the Trial Order are deleted from the system.
When the above search criteria “Has Trial order with no follow up”
“is” “Yes” is applied then the logic derives all the service
orders which satisfy additional search criteria applied in the search and
for these Service orders checks if the custom flag field is checked to
derive all Service orders which have Trial order. The custom flag values
values are derived from crmd_customer_h table in CRM.
4 )Further for all the Trial Orders determined in Step 3
check if the Trial Order has a follow up by checking if the custom flag field
is checked. The custom flag values are derived from crmd_customer_h table in
CRM.
5) If step 4 is not met populate the preceding Service
Orders in the Result list -
BPC 7.5 NW on BW 7.3 - Short Dump when using BADI
Hello all,
When migrating from MS bpc to Netweaver we've had to move some logic from script to BADI.
(Runlogic not supported)
However we now get shortdumps in when calling the BADI'
It works in BW 7.0 but now that we are on BW7.3 the error appears and shordumps occur.
During the upgrade SAP have updated the Class CL_UJR_WRITE_BACK to include a method "GET_DELTA"
That's where we have the problem. No OSS notes for it yet.
The problem shortsumps as follows:
Short Dump Log.
Category ABAP Programming Error
ABAP Program CL_UJR_WRITE_BACK=============CP
Application Component CPM-BPC
"ASSIGN_TYPE_CONFLICT" " "
"CL_UJR_WRITE_BACK=============CP" bzw.
"CL_UJR_WRITE_BACK=============CM00U"
"GET_DELTA"
Error occurs at line statement
ASSIGN COMPONENT uj00_cs_fieldname-keyfigure OF STRUCTURE <ls_data> TO <l_value>.
Any help out there?
Please.........
Thanks
PaulHi Paul,
First of all, there is a How To Guide for RUNLOGIC implementation. It uses BAdI approach as well, but doesn't call WRITE_BACK that can change from version to version.
Second, you should be able to see that method GET_DELTA is being called under
IF D_CALC_DELTA eq abap_true and df_bw_delta eq abap_false.
D_CALC_DELTA is set to TRUE only in Method WRITE_BACK_INT; I hope you aren't using that one.
DF_BW_DELTA is taken from DM Package parameters. Can you check what you have there or put just a break-point in PACKAGE_LOGIC_1 to see what value those 2 variables have?
Hope this helps,
Gersh -
Code to update a table using sqlldr
Hi all,
can anybody give the code to update a table using sqlldr with an example
thank youYou want add the new line and modified the existing line (based on empno) from file e:\scripts\sql\emp2_ext.dat into table emp2 :
7782,CLARK,MANAGER,7839,09/06/81,80000,,10
8000,ORACLE,DATABASE,,11/02/07,99999,,20Then :
SQL> conn system/mypwd
Connected.
SQL>
SQL> create directory my_dir as 'e:\scripts\sql';
Directory created.
SQL>
SQL> grant read,write on directory my_dir to scott;
Grant succeeded.
SQL>
SQL> conn scott/mypwd
Connected.
SQL> create table emp2_ext
2 (EMPNO NUMBER(4),
3 ENAME VARCHAR2(10),
4 JOB VARCHAR2(9),
5 MGR NUMBER(4),
6 HIREDATE DATE,
7 SAL NUMBER(7,2),
8 COMM NUMBER(7,2),
9 DEPTNO NUMBER(2)
10 )
11 ORGANIZATION EXTERNAL
12 ( TYPE ORACLE_LOADER
13 DEFAULT DIRECTORY my_dir
14 ACCESS PARAMETERS
15 ( records delimited by newline
16 badfile my_dir:'emp2_ext.bad'
17 logfile my_dir:'emp2_ext.log'
18 fields terminated by ','
19 missing field values are null
20 ( empno, ename, job, mgr, hiredate char date_format date mask "dd/mm/yy",
21 sal, comm, deptno
22 )
23 ) LOCATION ('emp2_ext.dat')
24 ) ;
Table created.
SQL>
SQL> select * from emp2_ext;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 80000 10
8000 ORACLE DATABASE 11/02/07 99999 20
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 24500 10
7839 KING PRESIDENT 17/11/81 50000 10
7934 MILLER CLERK 7782 23/01/82 13000 10
SQL> merge into emp2 a
2 using (select * from emp2_ext) b
3 on (a.empno=b.empno)
4 when matched then update set a.ename=b.ename,
5 a.job=b.job,
6 a.mgr=b.mgr,
7 a.hiredate=b.hiredate,
8 a.sal=b.sal,
9 a.comm=b.comm,
10 a.deptno=b.deptno
11 when not matched then insert (a.empno, a.ename, a.job, a.mgr, a.hiredate, a.sal, a.comm, a.deptno)
12 values (b.empno, b.ename, b.job, b.mgr, b.hiredate, b.sal, b.comm, b.deptno);
2 rows merged.
SQL>
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 80000 10 --modified line
7839 KING PRESIDENT 17/11/81 50000 10
7934 MILLER CLERK 7782 23/01/82 13000 10
8000 ORACLE DATABASE 11/02/07 99999 20 --added line
SQL> HTH,
Nicolas.
Well, Hans has already give good explanation with docs links...
Message was edited by:
N. Gasparotto -
Updating a record using pay element using the API (Almost Done)
Hi Everyone,
I have a question about updating a record using the PAY_ELEMENT_ENTRY_API.update_element_entry
I have process that doesn't error out, but its doesn't seem to update the record. So my question is, is the query below the correct way to get the element name and object version number when using this API? If not, what do I need to do?
BEGIN
SELECT MAX(pee.element_entry_id)
INTO x_element_id_mgr
FROM pay_element_types_f pet,
pay_element_links_f pel,
pay_element_entries_f pee,
per_all_assignments_f paaf,
per_all_people_f papf
WHERE pee.element_link_id = pel.element_link_id
AND pel.element_type_id = pet.element_type_id
AND paaf.assignment_id = pee.assignment_id
AND papf.person_id = paaf.person_id
AND pet.element_name = 'Mgr Rec Pct'
AND sysdate BETWEEN pee.effective_start_date AND pee.effective_end_date
AND sysdate BETWEEN pel.effective_start_date AND pel.effective_end_date
AND sysdate BETWEEN pet.effective_start_date AND pet.effective_end_date
AND sysdate BETWEEN paaf.effective_start_date AND paaf.effective_end_date
AND sysdate BETWEEN papf.effective_start_date AND papf.effective_end_date
AND paaf.assignment_id = c_staging.assignment_id
AND papf.person_id = c_staging.person_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN
--ROLLBACK TO s1;
v_error_message := 'For employee number '||c_staging.employee_number||' No data found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
WHEN OTHERS THEN
--ROLLBACK TO s1;
v_error_message := 'For employee number '||c_staging.employee_number||' Error found for element name Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
END;
--- Get OVN
BEGIN
SELECT MAX(Object_version_number)
INTO x_ele_object_version_number
FROM pay_element_entries_f
WHERE element_entry_id = x_element_id_mgr;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct ' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
WHEN OTHERS THEN
v_error_message := 'For employee number '||c_staging.employee_number||' Error in getting the OVN for Mgr Rec Pct' || SUBSTR(sqlerrm, 1, 200);
DBMS_OUTPUT.PUT_LINE('Error occurred : ' || v_error_message);
END;Your SQL isn't bad, although you're including loads of tables you don't need to so it's probably not as fast as it could be. I'm not sure you know what element entry to update so let's look at an example:
-- | Element Entry Id | OVN | Start Date | End Date | Pay Value |
-- +------------------+-----+------------+-------------+-----------+
-- | 123 2 1-Jan-2009 31-Jan-2011 USD 400
-- | 123 1 1-Feb-2009 18-Jun-2011 USD 500
-- | 123 1 19-Jun-2011 25-Jun-2011 USD 600
-- | 123 5 26-Jun-2011 31-Dec-4712 USD 700Here the one element entry (Id 123) has 4 effective rows. The employee gets $400 in Jan 2009, $500 from Feb 2009 to mid-June 2011, $600 for a few days later in June 2011 and then $700 from 26th June 2011 onwards.
So your question to the forum is which one do I update. Well, that depends which one you want to update. If you want to update the 1st Jan 2009 to 31st Jan 2011 you'd pass element_entry_id => 123, ovn => 2, effective_date => to_date('1-Jan-2009', 'DD-MON-YYYY') and datetrack_mode => 'CORRECTION'.
If you wanted to update the $700 row you'd pass OVN 5 and an effective date of 26th June 2011. And so-on.
Now in your SQL you're filtering based on sysdate, which means you'd be updating the $500 row (ovn=1). Is that what you want?
I have simplified your SQL as follows:
SELECT pee.element_entry_id
,pee.object_version_number
INTO x_element_id_mgr
,x_ele_object_version_number
FROM pay_element_entries_f pee
,pay_element_types_f pet
WHERE pee.assignment_id = c_staging.assignment_id
AND pee.element_type_id = pet.element_type_id
AND pet.element_name = 'Mgr Rec Pct'
AND trunc(sysdate) BETWEEN
pee.effective_start_date AND pee.effective_end_date
AND trunc(sysdate) BETWEEN
pet.effective_start_date AND pet.effective_end_date;This selects both the entry Id and OVN in one go; there's no need to have 2 SQL statements. If multiple entries are allowed, this SQL could return more than one row so just watch out for that. If you don't want the row as of sysdate change the two sysdate joins accordingly.
I hope that helps. -
What is the advantage of using badi in infospoke?
Hi all,
Can anyone let me know when shall we use badi along with infospoke. if we apply so, then what is the advantage of using badis in infospoke.
thanxs
harithaHi,
BADIs will come into picture where you want to do some messaging (manipulations)on data before downloading.
For eg while downloading the sales data you want to fetch billing data from billing related infoproviders , put a look up on billing info providers and update the sales data with billing info in BADI.
hope it helps..
regards,
raju -
Hello All,
Is there a BAPI to update ekpo-loekz field.
Thanks
AravindHi Arvind
Currenty you are passing only one line in the FM not internal table for the poitmes...
Main thing is you have to pass internal table for line items inf BAPI BAPI_PO_CHANGE instead of work area or single line
** Fill purchase order from ekko
l_purchaseorder = wa_ekko-ebeln. " Try to use EKKO-EBELN and change the logic accordingly..
LOOP AT it_ekpo INTO wa_ekpo where ebeln = wa_ekko-ebeln. " B4 this write FOR ALL ENTRIES logic to fill EKPO
CLEAR: l_purchaseorder,
l_r_poheader,
l_r_poheaderx.
l_poitem-po_item = wa_ekpo-ebelp.
l_poitem-delete_ind = C_X.
APPEND l_poitem.
l_poitemx-po_item = wa_ekpo-ebelp.
l_poitemx-PO_ITEMX = C_X.
l_poitemx-delete_ind = C_X.
APPEND l_poitemx.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_purchaseorder
TABLES
return = l_t_return
poitem = l_poitem[] " Pass Internal Table instead of one row
poitemx = l_poitemx[] . " Pass Internal Table instead of one row
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = C_X
ENDIF.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Hi, gurus !
Custom MIRO vendor line item splitting implemented throw BADI MRM_WT_SPLIT_UPDATE. BADI is active and called.
At transaction MIRO we try to imitate invoice posting. I see, that at badi method te_rbvs table is updated correctly. At invoice posting imitation screen incorrect amounts for vendor splitted lines appear.
At badi call start
I_RBKPV-H_RBVS
1 0000 000001 963.99
TE_RBVS[]
Initial
TI_DRSEG
1 ST 8000 607.02
2 ST 8000 172.64
3 ST 8000 49.18
4 ST 8000 16.02
5 ST 8000 119.13
At badi call end
I_RBKPV-H_RBVS
1 0000 000001 963.99
TE_RBVS[]
1 0000 000001 607.02
2 0000 000007 172.64
3 0000 000008 49.18
4 0000 000009 16.02
5 0000 000010 119.13
At imitation screen items appear as follows:
1 K C 607,02- LTL
2 S G 607,02 LTL
3 S G 172,64 LTL
4 S G 49,18 LTL
5 S G 16,02 LTL
6 S G 119,13 LTL
7 K C 607,02- LTL
8 K C 607,02- LTL
9 K C 607,02- LTL
10 K C 1.464,09 LTL
7-10 lines are incorrect.
Thanks in advance.
Edited by: Gabtia on Aug 7, 2009 4:00 PMHad anyone used BADI MRM_WT_SPLIT_UPDATE succesfuly ?
-
Screen-exit for xk01 using badi
Hai.. all.
i want to add customized screen for xk01.
by using badi i hav tried it its working and whatever the value am giving into screen is also updating into table .but my problem is while adding this screen in xk01 it is also updating xk02, xk03.
but in xk03 it should be in dispaly mode . in which method it hav to write code for diaplay mode screen
can anybody suggest me how to write it .........................
tanx in advance..............Modify the screen attributes to make them display only for transaction XK03. Write code in PBO of custom screen by using Loop at screen.....if sy-tcode = 'XK03'.....Endif......Endloop.
Thanks
Amol Lohade -
Updating Ekpo by adding item level Screen Exit
Hi,
I added 2 fields at the item level of the ME21N Screen using the following screen exit.
( SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 Subscreen: PO item. )
Now I just want to update EKPO table.,. How to proceed. any body know guide me.
Thanks & Regards.
Balajee.JHi Mou,
In this there are four methods
1)ACTIVATE_TAB_PAGE
2)TRANSFER_DATA_TO_SUBSCREEN
3)TRANSFER_DATA_FROM_SUBSCREEN
4)PASS_FCODE_TO_SUBSCREEN
In thw first method pass the tabname,screen no,position all.
fcaption = 'C Form Details'.
fprogram = 'Z_VLO1N_HEAD'.
fdynpro = '0200'. This is the screen created and kept all custom fields
Here you the concept set and get data and move and get the values.
TRANSFER_DATA_TO_SUBSCREEN
set PARAMETER ID 'Z' FIELD f_vbrk-ZCF.
TRANSFER_DATA_FROM_SUBSCREEN
get PARAMETER ID 'Z' FIELD fvbrk-ZCF.
Pass all these parameters it will resolve your issue.Check and post if need help.
Regards,
Madhu.
Maybe you are looking for
-
All my Windows 7 computers recognize the USB printer connected to my AirPort Extreme via Bonjour, but my new Windows 8 laptop cannot find it. Does anyone has the same issue? Does anyone has a solution? Thanks.
-
How to put equipment no. in Asset master data (manulaly)
Hi Guru I have implement Asset module and link asset no. to equipment no. come from Plant maintenance module. How I can put the equipment no. in field equipment number / Tab Allocations in Asset master data . How I can do? thank you very muc
-
How to empty 5000 photos from iPhoto's trash
hi guys a friend of mine - a newcomer to Mac OSX.. - has piled up 5000+ photos in iPhoto's trash & when he tried to empty it , iPhoto simply freezes & has to be closed using ''force quit''. he asked for my help but, no matter what i tried i simply d
-
Is there any way to get Bridge to recognize THM files as the JPG source of EXIF information for the 5D Mark II's MOV files? And, on that note, is there any way to get Bridge to manage the "sidecar" nature of these files (meaning, if you rename or co
-
Guide Please: what software can i practice Java web AS administration
HI all, i am pursuing ABAP WEB S ADMINISTRATION. To write certification. i need to complete java web as administration. what software(web application server) can i practice java web administration on. can i use trial netweaver for this. please let me