Help with ABAP Routine
Hello All!
I am getting data from Oracle into BW. One of the tables has 7 Objects. I am creating Info Objects as data targets and using the update rules to map the description of each of the object. For example:
Zip Code (With master data and no text) State (With no master data but with text- 0TXTSH)
Country (With no master data but with text-0TXTMD)
I am able to to load this fine as there are only two objects with description. The problem is when I have 6 objects with description and I can only map 3 of them to 0txtsh, 0txtmd,and 0txtlg.
How do I write the routine so that I can map all the descriptions of respective objects to 0TXTMD.
Please suggest.
Thanks for everybody's time.
You don't necessarily have to use the 0TXT* objects as source. You could add your own objects (e.g. CTXT*) to the InfoSource and map these to the texts for the different InfoObjects correspondingly.
If for some reason you don't want to do that you could still create 6 different DataSources (reading from the same table) and do all the mapping independently (which is a worse solution compared to the above but still possible.)
Regards, Klaus
Similar Messages
-
Populate new fields in DSO (DBTable) with ABAP routine
Hi,
I've added a couple of fields to a DSO. The DSO contains a large number of records (60m+) and I have a tight window to cutover so the activation time would be an issue if I use a loop transformation. Therefore, I am looking to populate the additional fields directly in the Active table using an ABAP routine.
One of the fields is a key figure to be derived from an existing CHAR field so would need to apply some logic during update, such as IF <CHAR_FIELD> CA 'ABC'. <KYF_FIELD> = 1 etc.
Aside from fairly basic Start Routines my ABAP is very poor so was wondering if anyone can help me with the syntax or, preferably some sample code to achieve this.
Thanks in advance,
AdHi,
In transformation of the cube, choose routine for char E.
There you can assign value in RESULT field. Actually RESULT field is assigned to E, find the code below,
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
raise exception type CX_RSROUT_ABORT.
... "to skip a record
raise exception type CX_RSROUT_SKIP_RECORD.
... "to clear target fields
raise exception type CX_RSROUT_SKIP_VAL.
(* insert your abap code here to find the value of E*.)
RESULT = * assign the value you got for E here.
rgrs,
v.sen -
I need some help with some ABAP.
I have a date value which is for example 01.01.2008. I want to store it in a DATS info object which is of length 8. How can I strip out the . in a transformation rule and should this logic be written in a START routine.
ThanksThanks for this.
the description for PDATE mentions an input value of DD/MM/YYYY, you would'nt know whether / could also mean . and/or how can I see the logic before PDATE?
Another problem encountered - since the field is referencing 0DATE (by default for DATS fields) I cannot make changes to the conversion exit or info object transfer routine
Edited by: Niten Shah on May 28, 2008 2:05
Okay have found the Function Modules behind the conversion routines:
CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
Edited by: Niten Shah on May 28, 2008 2:10 PM -
Hi experts!
I have a requirement and I need help with an abap routine.
I'm uploading a table from de ECC where each record contains one key figure per fiscal period (wlt01, wlt02,...wlt16). I need to have in a dso a unique key figure (called zwlt for instance) and the 0fiscper infoobject filled with the corresponding period, that is, for each record of the table, I need 16 records in the DSO with zwlt = wltXX and the fiscper = fiscyear&0&XX.
Any help please?
Thanks in advance.there are multiple ways to handle this.
one way is to use APD to unpivot the data.
or else you can use the following sample code to derive what you want...this code might just hint at the way to proceed.
TYPES:
BEGIN OF tys_SC_1,
wlt01 TYPE P LENGTH 8 DECIMALS 2,
wlt02 TYPE P LENGTH 8 DECIMALS 2,
wlt03 TYPE P LENGTH 8 DECIMALS 2,
wlt04 TYPE P LENGTH 8 DECIMALS 2,
wlt05 TYPE P LENGTH 8 DECIMALS 2,
wlt06 TYPE P LENGTH 8 DECIMALS 2,
wlt07 TYPE P LENGTH 8 DECIMALS 2,
wlt08 TYPE P LENGTH 8 DECIMALS 2,
wlt09 TYPE P LENGTH 8 DECIMALS 2,
wlt10 TYPE P LENGTH 8 DECIMALS 2,
wlt11 TYPE P LENGTH 8 DECIMALS 2,
wlt12 TYPE P LENGTH 8 DECIMALS 2,
END OF tys_SC_1.
DATA: ls_type TYPE tys_SC_1,
l_name TYPE string,
l_count Type n length 2.
FIELD-SYMBOLS:
<fs_type> TYPE tys_SC_1,
<result> TYPE P .
ls_type-wlt01 = '1.1'.
ls_type-wlt02 = '2.2'.
ls_type-wlt03 = '3.3'.
ls_type-wlt04 = '4.4'.
ls_type-wlt05 = '5.5'.
ls_type-wlt06 = '6.6'.
ls_type-wlt07 = '7.7'.
ls_type-wlt08 = '8.8'.
ls_type-wlt09 = '9.9'.
ls_type-wlt10 = '10.1'.
ls_type-wlt11 = '11.11'.
ls_type-wlt12 = '12.12'.
CLEAR: l_count , l_name.
l_count = '01'.
ASSIGN ls_type TO <fs_type> .
Write: / .
DO 12 TIMES.
clear: l_name.
Concatenate 'wlt' l_count into l_name.
ASSIGN COMPONENT l_name OF STRUCTURE <fs_type> TO <result> .
Write: / , l_name , ' = ' , <result>.
l_count = l_count + 1 .
ENDDO.
hope it helps.
Regards
Ashwin -
Help with Transformation routine
Hi,
I have a transformation routine from a DSO to a cube. The DSO contains two infoobjects ( Form, Brand ) which are mapped to infoobject Material in the cube. My requirement is that i need to populate the material number based on the brand and form available in the DSO. Can you please help me with the routine to be written for material ?
Regards
Snehith.Hi,
perform below steps in start routine .
create one internal as t_material having 3 fields
and then write select query as :
SELECT material
brand
form
FROM /BIC/PGPUMATL
INTO TABLE t_material
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE brand EQ SOURCE_PACKAGE-brand
form EQ SOURCE_PACKAGE- form
In transformation routine of material:
write below logic :
FIELD-SYMBOLS :<fs_ t_material > TYPE y_ t_material .
*" Get material class value from table /bic/agpud009900
READ TABLE t_material
ASSIGNING <fs_ t_material >
WITH KEY brand = SOURCE_FIELDS-brand
form = SOURCE_FIELDS- form
IF sy-subrc EQ 0
AND <fs_ t_material > IS ASSIGNED.
MOVE <fs_ t_material >material TO RESULT.
ENDIF.
Hope this helps you
Thanks . -
Help with ABAP Structure to XML - Simple Transformation
Hi guys,
I need help with a Simple Transformation. I am trying to convert a structure in ABAP to XML String but i ma getting short dumps...
Can any of you help.
Thanks in advance.
*& Report ZTESTXML
REPORT ZTESTXML.
class demo DEFINITION.
PUBLIC SECTION.
CLASS-METHODS main.
ENDCLASS.
CLASS demo IMPLEMENTATION.
method main.
data : begin of account,
partner type bu_partner,
primary(1),
update(3),
email(50),
memberid(4),
telephone(12),
fax(10),
dept(20),
end of account.
data : xmlstr type xstring.
account-partner = '12345'.
account-primary = 'N'.
account-update = 'Yes'.
account-email = 'zz at hotmail.com'.
account-memberid = '555'.
account-telephone = '123-448-6710'.
account-fax = '345-123-7899'.
account-dept = 'Info Systems'.
call TRANSFORMATION ztest_inttable
SOURCE account = 'account'
result XML xmlstr.
call FUNCTION 'DISPLAY_XML_STRING'
EXPORTING xml_string = xmlstr.
ENDMETHOD.
ENDCLASS.
start-of-SELECTION.
demo=>main( ).
Transformation
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="account"/>
<tt:template>
<IGT_CRM_AccountInfo>
<Account>
<tt:ref name=".account">
<tt:attribute name="Id" value-ref="PARTNER"/>
<tt:attribute name="Primary" value-ref="primary"/>
<tt:attribute name="Update" value-ref="update"/>
<Contact>
<tt:attribute name="EMail" value-ref="email"/>
<tt:attribute name="Member Id" value-ref="memberid"/>
</Contact>
<Communications>
<tt:attribute name="Telephone" value-ref="telephone"/>
<tt:attribute name="Fax" value-ref="fax"/>
</Communications>
<IGT>
<tt:attribute name="Department" value-ref="dept"/>
</IGT>
</tt:ref>
</Account>
</IGT_CRM_AccountInfo>
</tt:template>
</tt:transform>
Dump message
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_ST_REF_ACCESS', was not caught in
procedure "MAIN" "(METHOD)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The goal was to access variable "PARTNER". However, this access was not
possible.to convert abap itab or variable into xml string use ABAP key word call transformation.
call transformation (`ID`)
source output = itab[]
result xml xml_out.
where itab is your internal table or any abap variable.
xml_out is type string which will hold the resulting xml.
ID is the transformation program. if you wanto use your own transformation, use your XSLT or ST program there.
Raja -
Hi,
<b>I am new to ABAP.Can anyone help me wih this code</b>
<b>The following code is in start routine</b>
LOOP AT DATA_PACKAGE.
SELECT /BIC/ZPACTGY /BIC/ZMPIINIR FROM /BIC/PZCONDTYP
INTO IT_ZCONDTYP
WHERE /BIC/ZCONDTYP = DATA_PACKAGE-/BIC/ZCONDTYP.
IF ( IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR12' OR
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR13' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR14' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVV10' or
IT_ZCONDTYP-/BIC/ZMPIINIR Eq 'Y' or
( IT_ZCONDTYP-/Bic/zcondtyp ge 'Y100'
and IT_ZCONDTYP-/Bic/zcondtyp le 'Y199' ) ).
APPEND DATA_PACKAGE.
ENDIF.
endselect.
ENDLOOP.
<b>what I am trying to accomplish is I want my data which is in the internal table to satisfy the following conditions. and place it in internal table .(or whatever is correct)</b>
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR12' OR
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR13' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR14' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVV10' or
IT_ZCONDTYP-/BIC/ZMPIINIR Eq 'Y' or
( IT_ZCONDTYP-/Bic/zcondtyp ge 'Y100'
and IT_ZCONDTYP-/Bic/zcondtyp le 'Y199' ) ).
<b>and read this from another transfer routine</b>
CLEAR RESULT.
READ TABLE IT_ZCONDTYP WITH KEY
/BIC/ZCONDTYP = COMM_STRUCTURE-/BIC/ZCONDTYP
BINARY SEARCH.
IF SY-SUBRC EQ 0.
RESULT = IT_ZCONDTYP-/BIC/ZCONDTYP.
ENDIF.
<b>This is mostly related to BW.So if someone can give their opinion on how to achieve this I will be very grateful.</b>
thanks,
Kalhi Kal,
you have to specify what are you going to add to the datapackage internal table (before the append data_package statement).
hope this helps.
LOOP AT DATA_PACKAGE.
SELECT /BIC/ZPACTGY /BIC/ZMPIINIR FROM /BIC/PZCONDTYP
INTO IT_ZCONDTYP
WHERE /BIC/ZCONDTYP = DATA_PACKAGE-/BIC/ZCONDTYP.
IF ( IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR12' OR
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR13' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVR14' or
IT_ZCONDTYP-/BIC/ZPACTGY Eq 'VVV10' or
IT_ZCONDTYP-/BIC/ZMPIINIR Eq 'Y' or
( IT_ZCONDTYP-/Bic/zcondtyp ge 'Y100'
and IT_ZCONDTYP-/Bic/zcondtyp le 'Y199' ) ).
<i>DATA_PACKAGE-... = ....
DATA_PACKAGE-... = ....
DATA_PACKAGE-... = ....</i>
APPEND DATA_PACKAGE.
ENDIF.
endselect.
ENDLOOP. -
Dear BW Experts,
When we run this ABC quarter report, it returns values of 12 months of actuals, 12 months of forecast, and quarter one, two, three and four results. Where the quarter 1, 2, 3, 4 is to add 3 months of actuals and 3 months of forecast.
Usually depending on the forecast version you enter, like for eg. for forecast version F04, the report returns, 4 months of actuals with values and rest of the 8 months 0 value, and for Forecast values it returns 4 months of 0 value and 8 months of forecast. From this, results, the Q1 result would be = 3 months of actuals (Jan, feb, mar) + 3 months of Forecast (Jan, feb, mar).
Since the 3 months of forecast (Jan, feb, mar) is 0, it should add up the 3 months of actuals (Jan, feb, mar).
The following is the code we have currently, and the ABAP resource gave us the following but it's not working, it only returns the first month January's values when i use this variable, however we are not able to point out where the concern is...I was hoping if you could help please. My background in ABAP is very limited, so any suggestions you have would be appreciated.
WHEN 'ZPOPERQ1'.
IF I_STEP = 2.
CLEAR L_S_RANGE.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'ZPROJVER' or vnam = 'ZFORVERS'.
if loc_var_range-low+1(2) = '01'.
l_s_range-low = '000'.
l_s_range-high = '000'.
else.
l_s_range-low = '001'.
if loc_var_range-low+1(2) = '02'.
l_s_range-high = '001'.
elseif loc_var_range-low+1(2) = '03'.
l_s_range-high = '002'.
else.
l_s_range-high = '003'.
endif.
endif.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
endloop.
ENDIF.Hi Edwin,
i changed the variable to what you suggested then saved and activated the zxrsru01. I then ran the report, which aborts with the following message...
"ABORT ERROR FOR VARIABLE IN CUSTOMER ENHANCEMENT ZPOPERQ1"
Can you please suggest if there is anything else that needs to be changed.
Thank you... -
Need help with ABAP coding using java
Dear experts,
I have used ABAP to code many reports/function modules.However as i know java quite well,i want to achieve the same using java.I have utilized JCO to retrieve information from RFC in this mission.
However i realized that i had to code all things using ABAP and use java only as interface to connect to
SAP fetch that module and display information on console.It was not that fun.
I want that i should not Login to SAP but work only using java.
I heard SAP Netweaver is a good choice.But i dont know much about it.Will i be able to develop reports only by java and how ?
Plz suggest.hi,
I hope that you already have the J2ME Toolkit and that your emulator works okay. In the toolkit you get several examples to show you how to program a MIDlet. One has to do with a HTTP client server connection. Also in the API documentation for the J2ME there is a Connector class that you used to set up this communication and in the description of this class it pretty thoroughly explains how to set up an HTTP protocol client.
However, if you want to do some other kind of networking then you are pretty much out of luck, as the TCPIP socket protocol has not been fully implemented and is optional to the J2ME specifications, only the HTTP protocol is certain to be available. This means that mobile phone companies can add other networking functionality to their phone's java virtual machine if they feel like it. This is a bummer I know.
I hope this helps.
Cheers,
Mark -
Need help with transfer routine.
I am doing this enhancement in BW 3.5 version.
There is an object in ODS - > ZPATHNM (Pathname)
It gets data from ZPTDIR object.
Now, 0MATERIAL infoobject has text data. For PATH type materials it has descriptions like pt/dat/fafg.2.0 , pt/dat/ovg.2c ... so on.
The content after pt/dat/ for example fafq.2.0, ovg.2c is available in ODS object ZPATHNM (Pathname)
Since I have to extract PATH material numbers. So I created another object ZPATHMAT and mapping it to ZPTDIR.
I have to write a transfer routine when the 0MATERIAL text description had description beginning with pt/dat/ and the text after pt/dat/ is equal to data in ZPATHNM. i should get material number in ZPATHMAT.
This is the transfer routine, I have written between ZPATHMAT and ZPTDIR . This is working fine.
Data : ZDIRNAM type String,
ZCONT1 type string,
ZCONT2 type string,
ZMATERIAL(18) type C.
ZDIRNAM = TRAN_STRUCTURE-ZPTDIR.
IF ZDIRNAM is not Initial.
Concatenate 'pt/dat/' ZDIRNAM into ZCONT1.
Select single MATERIAL
into ZMATERIAL from /BI0/TMATERIAL
where TXTMD = ZCONT1.
RESULT = ZMATERIAL.
ENDIF.
Now there is another requirement, where I have to create one more object, ZPATHDES. This object should get Material description for path type materials from 0PROD_HIER text table.
This object, 0PROD_HIER is an attribute of 0MATERIAL.
So the logic to get the material description into ZPATHDES, is when the material number in 0MATERIAL is equal to material number in ZPATHMAT (generated from above routine), I should get description (TXTMD) from text table of 0PROD_HIER (/BI0/TPROD_HIER) into this ZPATHDES object.
I able not to connect this logic in the code and it is throwing errors.
I need help in coding.
Thanks.Very hard to understand the logic in a thread. Can you please write your code, which is throwing errors? May be that will help us.
Regards
amandeep sharma -
Help with abap code in Transformation
Hi Experts,
we have a scenario where we load delta data from an DSO into a Cube.
The records in the DSO looks like below.
Location as (L)
WorkOrder as (W)
Startdate(DDMMYYYY)/time (HH:MM:SS) as (S)
Finishdate/time as (F)
L1
W1
21/04/2009/10:00:00
21/04/2009/12:00:00
L1
W2
21/04/2009/14:00:00
21/04/2009/23:00:00
|| L1 ||W3|| 21/04/2009/16:00:00 ||21/04/2009/20:00:00 ||
Total time ( April 2009 ) for above Location L1 should be calculated as a difference between W1 and W2 since W3 is a overlapping record. So the result would be 13 Hrs. Work Orders are summarised, so we dont need work order info in the output.
Can you experts help me with the code to implement??
Thanks,
DVFor each location, for example L1, move the records to an internal table itab.
sort itab by startdate.
read table itab index 1.
You will get the first value.
sort itab by finishdate descending.
read table itab index 1.
you will get the second value.
Calculate the difference and populate it to the internal table.
finally modify the source package.
I have just given the logic. I hope you can build upon this.
I hope it helps.
Thanks. -
Help with ABAP code in CMOD.
dear all,
can you help me solve the below abap coding problem? thanks.
somewhere at the top
DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA: L_S_VAR_RANGE LIKE E_T_RANGE.
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
FIND l_s_var_range-vnam IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
ENDLOOP.
Error message...
"L_S_VAR_RANGE" cannot be converted to the line type of "I_T_VAR_RANGE".
Thanks all.Hi Try this,
DATA: L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA: L_S_VAR_RANGE LIKE LINE OF I_T_VAR_RANGE .
LOOP AT I_T_VAR_RANGE INTO L_S_VAR_RANGE. <-- error msg stops here.
FIND l_s_var_range-vnam IN TABLE it_vnam.
IF sy-subrc = 0.
l_check = 'X'.
EXIT.
ENDIF.
ENDLOOP.
Regards,
Ravi -
Help with abap proxies !!
Hi Friendz,
I am working on a scenario where a report is fetching data from a table which has around 2,00,000 records and passing this to an abap proxy to pass the data into XI and then XI creates a file out of this data. The scenario is working fine for smaller amount of data but throws a
short dump when it encounters a large amnount of data like 2-3 Lacs records.
The dump I am facing is SYSTEM_NO_ROLL.
Please suggest what can be the cause or if you want me to show the report, whichh triggers the proxy.
Thanks.Hi Friends,
Thank you very much for your replies. The program is as follows :
report yorder_spp_upload no standard page heading.
tables : vbak,
yorderspp,
vapma,
yspp_fscloc.
data : it_items type table of ymat_order_spp with header line.
types : begin of ty_vapma,
matnr type vapma-matnr,
vkorg type vapma-vkorg,
audat type vapma-audat,
bstnk type vapma-bstnk, "PO Number
vbeln type vapma-vbeln,
posnr type vapma-posnr,
end of ty_vapma.
data : it_vapma type table of ty_vapma,
wa_vapma like line of it_vapma.
types : begin of ty_vbap,
vbeln type vbap-vbeln,
posnr type vbap-posnr,
matnr type vbap-matnr,
kwmeng type vbap-kwmeng,
meins type vbap-meins,
pstyv type vbap-pstyv,
werks type vbap-werks,
end of ty_vbap.
data : it_vbap type table of ty_vbap,
wa_vbap like line of it_vbap.
types : begin of ty_final,
crmordqtyv type vbap-kwmeng,
crmpgidatw type vbap-erdat,
crm_facloc type vbap-werks,
crm_fstloc type vbap-werks,
crm_itcrat type vbap-erdat,
crm_itmtyp type vbap-pstyv,
crm_order type vbap-vbeln,
crm_numint type vbap-posnr,
crm_ohguid type vapma-bstnk,
crm_reqdat type vbap-erdat,
crm_shipto type vbak-kunnr,
crm_prod_id type vbap-matnr,
crm_doctyp type vapma-vkorg,
end of ty_final.
data : it_final type table of ty_final.
data : wa_final like line of it_final.
data : ydate type sy-datum.
data: i_options like rfc_db_opt occurs 0,
i_fields like rfc_db_fld occurs 0,
i_data like tab512 occurs 0,
i_table_name like dd02l occurs 0 with header line.
data : it_orderspp type table of yorderspp,
wa_orderspp type yorderspp.
data : prxy type ref to zeccsppco_mi_ecc_spp_ob.
data : m_data type zeccsppmt_ecc_to_spp_ib,
s_data type zeccsppmt_ecc_to_spp_ib,
w_data type zeccsppdt_ecc_to_spp_ib_row,
t_data type zeccsppdt_ecc_to_spp_ib_ro_tab.
data : l_date type datum,
f_date type datum.
selection-screen begin of block b1 with frame.
select-options : s_matnr for vapma-matnr,
s_audat for vapma-audat,
s_werks for vapma-werks,
s_auart for vapma-auart,
s_vkorg for vapma-vkorg.
selection-screen end of block b1.
start-of-selection.
perform select_data_upload_table.
perform read_data.
*& Form select_data_upload_table
text
form select_data_upload_table.
delete all the data from table "yorderspp".
delete from yorderspp.
commit work.
wait up to 2 seconds.
If Input s_audat(Order date) is initial, It will fetch last Calendar months data.
if s_audat[] is initial.
call function 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
exporting
i_date_old = sy-datum
importing
e_date_new = l_date.
concatenate l_date+0(6) '01' into f_date.
s_audat-low = f_date.
s_audat-high = l_date.
s_audat-option = 'BT'.
s_audat-sign = 'I'.
append s_audat.
endif.
Selection of order no and respective items from table VAPMA.
select matnr vkorg audat bstnk vbeln posnr werks
into corresponding fields of table it_vapma
from vapma
where matnr in s_matnr
and vkorg in s_vkorg
and auart in s_auart
and werks in s_werks
and audat in s_audat.
Selection of data based on order number from table VBAP.
if not it_vapma[] is initial.
select vbeln posnr matnr kwmeng meins pstyv werks
into corresponding fields of table it_vbap
from vbap
for all entries in it_vapma
where vbeln = it_vapma-vbeln
and posnr = it_vapma-posnr
and pstyv = 'ZTAN'
and werks in s_werks.
endif.
loop at it_vapma into wa_vapma.
read table it_vbap into wa_vbap with key vbeln = wa_vapma-vbeln
posnr = wa_vapma-posnr
matnr = wa_vapma-matnr.
if sy-subrc = 0.
select single * from vbak where vbeln = wa_vbap-vbeln.
yorderspp-crm_entdt = sy-datum.
yorderspp-crm_order = wa_vbap-vbeln.
yorderspp-crm_numint = wa_vbap-posnr.
yorderspp-crmordqtyv = wa_vbap-kwmeng.
yorderspp-crmpgidatw = wa_vapma-audat.
yorderspp-crm_facloc = wa_vbap-werks.
yorderspp-crm_fstloc = wa_vbap-werks.
yorderspp-crm_itcrat = wa_vapma-audat.
yorderspp-crm_itmtyp = wa_vbap-pstyv.
yorderspp-crm_ohguid = wa_vapma-bstnk.
yorderspp-crm_reqdat = wa_vapma-audat.
yorderspp-crm_shipto = vbak-kunnr.
yorderspp-crm_prod_id = wa_vbap-matnr.
yorderspp-crm_doctyp = wa_vapma-vkorg.
insert yorderspp.
commit work.
endif.
endloop.
wait up to 5 seconds.
endform. "select_data_upload_table
*& Form READ_DATA
text
form read_data.
select * from yorderspp into table it_orderspp.
if sy-subrc = 0.
create object prxy.
loop at it_orderspp into wa_orderspp.
select single * from yspp_fscloc where s_vkorg = wa_orderspp-crm_doctyp
and s_werks = wa_orderspp-crm_fstloc.
if sy-subrc = 0.
wa_orderspp-crm_facloc = yspp_fscloc-s_facloc.
wa_orderspp-crm_fstloc = yspp_fscloc-s_fstloc.
else.
select single * from yspp_fscloc where s_vkorg = wa_orderspp-crm_doctyp
and s_werks = space.
if sy-subrc = 0.
wa_orderspp-crm_facloc = yspp_fscloc-s_facloc.
wa_orderspp-crm_fstloc = yspp_fscloc-s_fstloc.
else.
wa_orderspp-crm_facloc = wa_orderspp-crm_fstloc.
endif.
endif.
w_data-crmordqtyv = wa_orderspp-crmordqtyv.
w_data-crmpgidatw = wa_orderspp-crmpgidatw.
w_data-crm_facloc = wa_orderspp-crm_facloc.
w_data-crm_fstloc = wa_orderspp-crm_fstloc.
w_data-crm_itcrat = wa_orderspp-crm_itcrat.
w_data-crm_itmtyp = wa_orderspp-crm_itmtyp.
w_data-crm_numint = wa_orderspp-crm_numint.
w_data-crm_ohguid = wa_orderspp-crm_ohguid.
w_data-crm_reqdat = wa_orderspp-crm_reqdat.
w_data-crm_shipto = wa_orderspp-crm_shipto.
w_data-crmprod_id = wa_orderspp-crm_prod_id.
append w_data to t_data.
clear w_data.
endloop.
s_data-mt_ecc_to_spp_ib-row = t_data.
m_data = s_data.
try.
call method prxy->execute_asynchronous
exporting
output = s_data.
commit work.
catch cx_ai_system_fault .
data fault type ref to cx_ai_system_fault .
create object fault.
write :/ fault->errortext.
endtry.
endif.
endform. "READ_DATA -
Need help with SCHECK routine in RFFOUS_C(it produces an extra page!)
Hello Experts,
I noticed that in one part of the routine SCHECK which can be found in standard program RFFOUS_C, there
is a code that for EVERY END of a house bank, it calls again the window 'CHECK' and element 540. Now,
this creates an extra page which I do not need. Also, they wouldn't let me customize the standard program
since it is being used by many companies. I tried commenting the element but it produces an error.
So for example I only have 3 payment documents, it should produce only 3 pages. I have checked the line items
and they are not enough to trigger an overflow.
Below is the code which causes an extra page:
*-- Ende der Hausbank --------------------------------------------------
*-- end of house bank --------------------------------------------------
AT END OF reguh-ubnkl.
IF cnt_formulare NE 0. "Formularabschluß erforderlich
"summary necessary
* close last check
CALL FUNCTION 'CLOSE_FORM'
IMPORTING RESULT = itcpp.
IF itcpp-tdspoolid NE 0.
CLEAR tab_ausgabe.
tab_ausgabe-name = t042z-text1.
tab_ausgabe-dataset = itcpp-tddataset.
tab_ausgabe-spoolnr = itcpp-tdspoolid.
tab_ausgabe-immed = par_sofz.
COLLECT tab_ausgabe.
ENDIF.
CLEAR flg_druckmodus.
IF hlp_laufk NE '*' "kein Onlinedruck
"no online check print
AND par_nosu EQ space. "Formularabschluß gewünscht
"summary requested
* Formular für den Abschluß starten
* start form for summary
SET COUNTRY space.
IMPORT itcpo FROM MEMORY ID 'RFFORI01_ITCPO'.
itcpo-tdnewid = space.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = t042e-zforn
device = 'PRINTER'
language = t001-spras
options = itcpo
dialog = space.
CALL FUNCTION 'START_FORM'
EXPORTING
startpage = 'LAST'
language = t001-spras.
* Vornumerierte Schecks: letzte Schecknummer ermitteln
* prenumbered checks: compute last check number
IF flg_schecknum EQ 1.
PERFORM schecknummer_ermitteln USING 3.
ENDIF.
* Ausgabe des Formularabschlusses
* print summary
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'SUMMARY'
EXCEPTIONS
window = 1.
IF sy-subrc EQ 1.
err_element-fname = t042e-zforn.
err_element-fenst = 'SUMMARY'.
err_element-elemt = space.
err_element-text = space.
COLLECT err_element.
ENDIF.
* Fenster Scheck, Element Entwertet
* window check, element voided check
CALL FUNCTION 'WRITE_FORM' "<-------IT CALLS AGAIN THE CHECK WINDOW SO
EXPORTING "ANOTHER PAGE IS CREATED WHICH I DO NOT NEED
window = 'CHECK'
element = '540'
EXCEPTIONS
window = 1 "Fehler bereits oben gemerkt
element = 2. "error already noted
* Formular für den Abschluß beenden
* end form for summary
CALL FUNCTION 'END_FORM'
IMPORTING
RESULT = itcpp.
IF itcpp-tdpages EQ 0. "Print via RDI
itcpp-tdpages = 1.
ENDIF.
cnt_seiten = itcpp-tdpages. "Für vornumerierte Schecks
"For prenumbered checks
IF flg_schecknum EQ 1 AND cnt_seiten GT 0.
PERFORM scheckinfo_speichern USING 3.
ENDIF.
* Abschluß des Formulars
* close form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = itcpp.
IF itcpp-tdspoolid NE 0.
CLEAR tab_ausgabe.
tab_ausgabe-name = t042z-text1.
tab_ausgabe-dataset = itcpp-tddataset.
tab_ausgabe-spoolnr = itcpp-tdspoolid.
tab_ausgabe-immed = par_sofz.
COLLECT tab_ausgabe.
ENDIF.
ENDIF.
IF NOT itcpp-tdspoolid IS INITIAL.
CALL FUNCTION 'RSPO_FINAL_SPOOLJOB'
EXPORTING
rqident = itcpp-tdspoolid
set = 'X'
force = 'X'
EXCEPTIONS
OTHERS = 4.
IF sy-subrc NE 0.
MOVE-CORRESPONDING syst TO fimsg.
PERFORM message USING fimsg-msgno.
ENDIF.
ENDIF.
ENDIF.
ENDAT.I guess, with out customizing the driver program your issue will not be solved.
Don't worry, even if you customized your driver program it will not effect othr companies that are using it.. since check printing program configutation is done at company code level.
For more information on config of check printing program visit transaction code FBZP.
Regards,
SaiRam -
Help with Abap Querys!!!!
Hi all,
i have to create a z transaction for an abap querys but the queries are in the productive system but not in the quality and development system. Any body know how to put a z transaction for that queries???.as u know ABAP Query is Client Dependent , So Create Tcode in DEV with the same name of Query of PRO.In that case u cannt test this one in DEV and QAs.
Regards
Prabhu
Maybe you are looking for
-
After the Firefox update this week (Sept 7?) links from emails won't open. I get an error message. So I've temporarily set IE as my default browser, and the links work.
-
Automatic transfer of Shared Library: does it "catch-up" when Mac back on?
I setup this feature and it works great, although it seems that both computers must be on and iTunes running for it to work. Now, if the Mac (or PC) that "subscribes" to the main Mac's library (where I purchase music) was turned off, does it "catch-u
-
Tried an android phone for 3 days and Apple removed my phone/number from my Apple ID account. Now I'm back with the iPhone and I can't link to my Apple ID. How do I re-connect?
-
Best way to repair a corrupt installation
Hello, I am trying to fix a problem for a non-technical friend, and I'm fairly new to the Mac myself, so I thought that it would be safest to ask for advice before I begin. It looks like I'm going to have to reinstall the OS, and since my friend can'
-
I want to upload the new version but my iphone is not going to connect the itunes
my mobile was working right. last night i connect my iphone with my computer than itunes ask me to upload the new version. i click on yes. itunes ask me to put your data on backup i click on yes. after 1 minute its coming one error that we can,not up