How to route the file, base on the file name without touching file content?
Hi All,
can you please provide me solution how to route the file based on file name with out touching file content.
Business criteria :
> One source directory having zip files with different file names
> File adapter have to pick the zip files and have to route it to different email addresses based on fist 5 characters of file name.
please provide possible solutions to route the zip files to target.
Regards,
Sreeramulu Konjeti.
You can use Standard context object FILENAME.
in receiver determination Put a condition based on standard context object FileNAME
In the receiver determination, in the condition channel, use the Technical context object 'FileName' for file adapter.
Follow the below path:
Goto Receiver Detrmination --> Condition --> Left Operand f1 Help --> select first option 'Context Object' --> 1 List will be popped up --> Select FileName for File adapter from that list
It will route the file based on filename.
You can use CP for contains pattern (u2248) in condition
FileNAME u2248 ABCFI*
Similar Messages
-
I have had Aperture 3 loaded on my computer for a while now. Never had any problems till tonight. Restarted my computer and went to open Aperture and a "warning" box poped up, There was an error opening the data base for the library /picture/aperture library ap library. Then a "quit" button.
What is going on and how can I open my aperture. I have pictures that need worked for clients. Help!Have you run through the steps in Aperture 3: Troubleshooting Basics. If not that's always a good place to start.
If that doesn;t resolve the problem when you post back describe your hardware and software setup.
good luck -
Hi all,
I have an iMovie project in iMovie HD 6.0.3. (Mac OS 10.5.8)
It plays, but I cannot copy the file (including saving it to a flash drive). I get either a message
"the finder cannot complete the operation because some data in [name of
iMovie file] could not be read or written (Error Code 26)" or the
message "A project file is missing. The file [name of the QuickTime
movie inside the project.dv] couldn't be opened and is being skipped."
This happened suddenly, I was able to save a backup version numerous
times while working on the project.
I followed some of Karl Petersen's advise on apple discussions. I opened
the package contents, and everything seems to be there. The source file
(original QuickTime movie) is there and can be opened and played. I
replaced the current project file with the backup in the package
contents, but that did not change anything. I was able to export the
movie timeline into a new project as a single clip, but would like to be
able to copy the current project.
Thanks for any ideas..Make sure all drives are formatted as "Mac OS Extended". (Journalling preferred, but not necessary).
-
Problem when saving the Data basis for the Consolidation
Hi Gurus,
I am having 2 problems.
1) When i try to execute the UCWB transaction . It gives an information message
" Data basis DB needs to be generated (after upgrade) . I am following the procedure given in that "<b>Run maintenance of data basis DB in display mode. Go to the "Data Streams" tab page. Choose the "Generate" button.
If changes to Customizing settings are permitted in the current system or client, as an alternative you can maintain the data basis in change mode and save. In the case of systems supplied with Customizing transports, as an alternative you can generate the data basis in the source system and then transport it again.</b>
Even after doing that procedure when i again execute the UCWB. it give me the same message.
2) when is try to save data basis for the consolidation . it give me this error message.
"Field 0HC_ATCCODE: This compound differs from that of basic field 0HC_MEDCTG"
I have checked the referenced Info objects . Checked the compound info objects. Activated them again. They dont differ in any way. but still i get this problem.
Please help me out. If someone has come across this error and solved. Please help me.
Regards
satishHi satish,
I constantly receive the message like your #2 saying that it was a critical change in X infoobject. It's just a warning and I found several OSS notes saying that this message is not correct. Just ignore it.
In case of your Q #1. The data basis might be generated in two ways: by pressing Save icon and by clicking the Generate icon (the system refers just to this very option) and then - Save. The last way is used in Productive environment. Try it.
Hope this helps. -
i think my iphone 4s has a damaged software because it locks the phone always and powers it off without touching the power button. how can i rectify this problem?? i already tried erasing all the settings and content of the phone. thanks..!
This is a user to user help forum only. You are not addressing Apple here.
My iPhone 4S, iPhone 5, and iPad 2 are running 6.1.3 with no such problem and the same with the overwhelming majority of iOS devices running 6.1.3. -
"the system can't find the disk", but it's always connected without touching it! Can anyone help me?!
I tried to reset the ipod but I cannot syncronize the new music I added.
Could it be a problem of the songs or the ipod?Assumng you have a PC, start here:
iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows -
How to create an Installed base from the sales order
Dear Friends,
could any one let me know the process of creating an Installed base with the below process.
Once a sales order is created in SD, an istalled base need to be created in CRM system with reference to sales order.
There are around 50 final products and approximately 2000(BOM)components for each product exists. but the client wants to maintain only few components
like 100 to 200 components in Installed base.
In CRM system, can we maintain Installed base Template with that 100 or 200 components. If yes, how do we assign the Individual objects(Serial numbers) to each component.
Regards,
VenHi Ajay
there can be two possibilities
Option 1. Create Install base in CRM while creating Sales order in ECC using RFC CRM_IBASE_CREATE. Make some reference of sales order in the Ibase. later when you move equipments to CRM then you can attach these equipments to Ibase (Already created in Thru RFC)in Badi CRM_EQUI_LOAD(This BAdi is called while moving equipments from ECC to CRM).
Option 2. Don't create Ibase at the creation of Sales order. but while creating Equipment just add some indiacator in the equipment to know which sale sorder this equipments belongs.
and once these equipments moves to CRM. Using the BADI CRM_EQUI_LOAD you can club all the equipments(of same sales order) under one ibase.
Regards
Naresh -
How to dispaly datas from the table, base on the selection screen
hi there gurus,
im currently developing a stock aging report,
i have completed one program but it do not allow me to excutes the program althought the syntax is correct.
i would to get some ideas from you, regarding how to extract the datas from the tables?
my selction screen will be, mat number, date, and gl account.
and the out put datas are, mbew-matnr, makt-maktx, mbew-lbkum, mara_meins, mbew-salk3,and the consumptions for the past 12months and the values for it.
can u plz guide me with this,
thank you,.
this is kind of very urgent program that i need to finish , plz help me.here is the total code the i do
REPORT ZSTK_AGING_REP2.
*TABLES
TABLES: mseg,
mara,
makt,
SKAT,
SKA1,
MARV,
T001,
T030,
T149D,
AM07M,
MCMSEG,
T001K,
T001W,
T134M,
vbak,
mbew,
mcon, rmcb0, marc, t024w, mvke, v134w, t438a, propf, maprf, t000, t024e
, tvko.
DATA: BEGIN OF ta_material OCCURS 2,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
labst LIKE mard-labst,
umlme LIKE mard-umlme,
insme LIKE mard-insme,
einme LIKE mard-einme,
speme LIKE mard-speme,
retme LIKE mard-retme,
verpr LIKE mbew-verpr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
erdat LIKE vbak-erdat,
END OF ta_material.
DATA: BEGIN OF ta_mseg OCCURS 2,
mblnr LIKE mseg-mblnr,
*->Begin of KL02+ -
mjahr like mseg-mjahr,
zeile like mseg-zeile,
*->End of KL02+ -
meins LIKE mseg-meins,
menge LIKE mseg-menge,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
budat LIKE mkpf-budat,
saknr LIKE SKA1-SAKNR,
END OF ta_mseg.
single recs based on MATNR
DATA: BEGIN OF i_matnr OCCURS 0,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
maktx LIKE makt-maktx,
mblnr LIKE mseg-mblnr,
verpr LIKE mbew-verpr,
labst LIKE mard-labst, "Valuated stock with
*unrestricted use
umlme LIKE mard-umlme, "Stock in transfer
*(from one storage location to another)
insme LIKE mard-insme, "Stock in quality
*inspection
einme LIKE mard-einme, "Total Stock of All
*Restricted Batches
speme LIKE mard-speme, "Blocked stock
retme LIKE mard-retme, "Blocked Stock Returns
meins LIKE mara-meins, "base unit
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
END OF i_matnr.
recs based on MBLNR
DATA: BEGIN OF i_mblnr OCCURS 0,
mblnr LIKE mseg-mblnr,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
meint LIKE mseg-meins,
budat LIKE mkpf-budat,
bukrs LIKE t001-bukrs,
konts LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
END OF i_mblnr.
TYPES: BEGIN OF t_mat,
lgort LIKE mseg-lgort,
werks LIKE mseg-werks,
matnr LIKE mseg-matnr,
mblnr LIKE mseg-mblnr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat.
DATA: i_mat2 TYPE t_mat OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF t_mat2,
lgort LIKE mard-lgort, " storage location
cnt0(5),
cnt1(5),
cnt2(5),
cnt3(5),
cnt4(5),
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat2.
DATA: i_matsum TYPE t_mat2 OCCURS 0 WITH HEADER LINE.
DATA: w_mengb TYPE mbew-lbkum,
w_workqyt TYPE mbew-lbkum,
w_index TYPE sy-tabix,
*DATA: w_mengb TYPE mard-labst, "tmp Balance qty
w_workqty TYPE mard-labst, "Work qty
w_index TYPE sy-tabix,
w_days(5) TYPE n, "duration difference (days)
w_mths(5) TYPE n, "duration difference (mths)
w_dat1 TYPE sy-datum, "date
w_dat2 TYPE sy-datum, "today's date
w_detl(1) TYPE c,
w_summ(1) TYPE c,
w_denom TYPE i,
w_numer TYPE i,
w_conv TYPE i,
w_ttlcnt TYPE i,
w_cnt TYPE i,
v_topofpage(1),
w_meng LIKE mard-labst,
w_meng LIKE mbew-lbkum,
*sapscript values
w_title(20) TYPE c. "Summary / Detail Report
DATA: lv_peinh LIKE mbew-peinh, "Price Unit
lv_verpr LIKE mbew-verpr. "Moving Price
proram comes here
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_werks FOR mseg-werks,
s_lgort FOR mseg-lgort,
s_matnr FOR mara-matnr,
s_saknr FOR ska1-saknr,
S_ERDAT FOR VBAK-ERDAT.
PARAMETERS: pck_detl RADIOBUTTON GROUP rep1,
pck_summ RADIOBUTTON GROUP rep1,
pck_dtsm RADIOBUTTON GROUP rep1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK blk1.
top of the page
TOP-OF-PAGE.
PERFORM f_top_of_page.
FORM f_top_of_page .
IF v_topofpage = 'D'.
*-->Report header for detail report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Detail',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--=<QTY ON THIS DATE -->',
78 '<-- =< 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ELSE.
*-->Report header for Summary report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Summary',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--< QTY ON THIS DATE -->',
78 '<-- < 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ENDIF.
ENDFORM. " f_top_of_page
*start-of-selection
*PERFOM f_data_selection.
FORM f_data_selection.
SELECT a~werks
a~lgort
a~matnr
a~saknr
a~lbkum
a~erdat
a~labst
a~umlme
a~insme
a~einme
a~speme
a~retme
b~verpr "this field no long been used
c~maktx
d~meins
INTO CORRESPONDING FIELDS OF TABLE ta_material
FROM mard AS a
INNER JOIN makt AS c ON amatnr = cmatnr
INNER JOIN mara AS d ON amatnr = dmatnr
WHERE a~matnr IN s_matnr
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND a~saknr IN s_saknr
AND a~erdat IN s_erdat
AND c~spras = 'EN'.
*--> SC01 - End of Insertion **
*-->Select material documents
SELECT a~mblnr
a~mjahr
a~zeile
a~meins
a~menge
a~werks
a~lgort
a~matnr
b~budat
INTO CORRESPONDING FIELDS OF TABLE ta_mseg
FROM mseg AS a INNER JOIN mkpf AS b
ON amblnr = bmblnr
AND amjahr = bmjahr
FOR ALL ENTRIES IN ta_material
WHERE matnr = ta_material-matnr
AND a~werks = ta_material-werks
AND a~lgort = ta_material-lgort
AND algort NE aumlgo
AND a~shkzg = 'S'
AND a~smbln EQ space
AND a~smblp EQ space.
*--> SC03 - Start of Insertion **
If MBLNR exist in MSEG-SMBLN and this
record's SHKZG = 'H'. Remove it from the table.
This is becuase this particular record has already been reverse.
LOOP AT ta_mseg.
SELECT SINGLE *
FROM mseg
WHERE smbln = ta_mseg-mblnr
*->Begin of KL02+ -
and SMBLP = ta_mseg-zeile.
AND shkzg = 'H'. "return. " KL02-
*->End of KL02+ -
IF sy-subrc = 0.
DELETE ta_mseg.
ENDIF.
ENDLOOP.
*--> SC03 - Enf of Insertion **
ENDFORM. " f_data_selection
*IMPORTANT , NEED TO CHECK LATER
FORM f_data_preparation.
*-->Append data for report details
LOOP AT ta_material.
DATA: ta_msegtemp LIKE ta_mseg OCCURS 2 WITH HEADER LINE.
*-->Loop at all material documents into a temp table
REFRESH ta_msegtemp. CLEAR ta_msegtemp.
LOOP AT ta_mseg WHERE matnr = ta_material-matnr AND
werks = ta_material-werks AND
lgort = ta_material-lgort.
ta_msegtemp = ta_mseg. APPEND ta_msegtemp.
ENDLOOP.
*-->Add up all the stock for the material
CLEAR w_mengb.
w_mengb = ta_material-labst +
ta_material-umlme +
ta_material-insme +
ta_material-einme +
ta_material-speme +
ta_material-retme.
IF w_mengb IS INITIAL.
CONTINUE.
ENDIF.
*-->sort msegtemp by posting date
SORT ta_msegtemp BY budat DESCENDING.
*-->get the values from the material documents into the report output
LOOP AT ta_msegtemp.
*->Begin of KL02- -
CALL FUNCTION 'HRCM_TIME_PERIOD_CALCULATE'
EXPORTING
begda = ta_msegtemp-budat
endda = sy-datum
IMPORTING
NOYRS =
nomns = w_mths
nodys = w_days
EXCEPTIONS
invalid_dates = 1
overflow = 2
OTHERS = 3
*->End of KL02- -
*->Begin of KL02+ -
*-->Get the days difference btw two dates
clear w_days.
w_days = sy-datum - ta_msegtemp-budat.
*--> Include today's date into calculation
w_days = w_days + 1.
*->End of KL02+ -
check base unit, do conversion
IF ta_material-meins <> ta_msegtemp-meins.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = ta_material-matnr
i_in_me = ta_msegtemp-meins
i_out_me = ta_material-meins
i_menge = ta_msegtemp-menge
IMPORTING
e_menge = ta_msegtemp-menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
ENDIF.
*--> SC01 - Start of Insertion **
SELECT SINGLE peinh
verpr
INTO (lv_peinh,
lv_verpr)
FROM mbew
WHERE matnr = ta_material-matnr
AND bwkey = ta_material-werks.
IF sy-subrc = 0.
ta_material-verpr = lv_verpr.
ENDIF.
*--> SC01 - End of Insertion **
*-->check whether the mseg value is LE than the stock value
IF ta_msegtemp-menge LE w_mengb.
*-->Days < 10 days
IF w_days LE 1 AND w_days EQ 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
**-->Days 11 - 30 days
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 31-60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 61-90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**-->Days > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = w_mengb - ta_msegtemp-menge.
ELSE.
IF NOT w_mengb LE 0 .
IF NOT lv_peinh EQ 0.
**->End of KL001+
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh )
*ta_material-verpr."+SC01
**->Begin of KL001+
ENDIF.
ELSEIF w_days GE 22.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh )
*ta_material-verpr.
ENDIF.
**->End of KL001+
ENDIF.
**--> SC02 - End of Insertioin **
ENDIF.
*->End of KL002-
*->Begin of KL002+
*--> < 10 days
IF w_days EQ 1 AND w_days LE 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 31 - 60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 61 - 90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = 0.
ENDIF. " check stock value NE zero
ENDIF. "check Mat doc amount is LE than the stock value
ENDIF.
ENDLOOP. " msegtemp
*-->append i_mat2 values
i_mat2-werks = ta_material-werks.
i_mat2-lgort = ta_material-lgort.
i_mat2-matnr = ta_material-matnr.
i_mat2-maktx = ta_material-maktx.
i_mat2-meins = ta_material-meins.
APPEND i_mat2. CLEAR i_mat2.
ENDLOOP. " ta_material
*-->Append data for summary data
DATA: i_lgort LIKE i_mat2 OCCURS 2 WITH HEADER LINE.
i_lgort[] = i_mat2[].
SORT i_lgort BY werks lgort.
DELETE ADJACENT DUPLICATES FROM i_lgort COMPARING werks lgort.
DATA: v_cnt0(5), v_cnt1(5), v_cnt2(5), v_cnt3(5), v_cnt4(5),
v_value0 LIKE i_matsum-value0.
v_value1 LIKE i_matsum-value1,
v_value2 LIKE i_matsum-value2,
v_value3 LIKE i_matsum-value3,
v_value4 LIKE i_matsum-value4.
LOOP AT i_lgort.
CLEAR v_cnt0. CLEAR v_value0.
CLEAR v_cnt1. CLEAR v_value1.
CLEAR v_cnt2. CLEAR v_value2.
CLEAR v_cnt3. CLEAR v_value3.
CLEAR v_cnt4. CLEAR v_value4.
LOOP AT i_mat2 WHERE lgort = i_lgort-lgort AND
werks = i_lgort-werks.
IF NOT i_mat2-meng0 IS INITIAL.
v_cnt0 = v_cnt0 + 1.
v_value0 = v_value0 + i_mat2-value0.
ENDIF.
IF NOT i_mat2-meng1 IS INITIAL.
v_cnt1 = v_cnt1 + 1.
v_value1 = v_value1 + i_mat2-value1.
ENDIF.
IF NOT i_mat2-meng2 IS INITIAL.
v_cnt2 = v_cnt2 + 1.
v_value2 = v_value2 + i_mat2-value2.
ENDIF.
IF NOT i_mat2-meng3 IS INITIAL.
v_cnt3 = v_cnt3 + 1.
v_value3 = v_value3 + i_mat2-value3.
ENDIF.
IF NOT i_mat2-meng4 IS INITIAL.
v_cnt4 = v_cnt4 + 1.
v_value4 = v_value4 + i_mat2-value4.
ENDIF.
ENDLOOP.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt0 NE space.
i_matsum-cnt0 = v_cnt0.
i_matsum-value0 = v_value0.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt1 NE space.
i_matsum-cnt1 = v_cnt1.
i_matsum-value1 = v_value1.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt2 NE space.
i_matsum-cnt2 = v_cnt2.
i_matsum-value2 = v_value2.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt3 NE space.
i_matsum-cnt3 = v_cnt3.
i_matsum-value3 = v_value3.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt4 NE space.
i_matsum-cnt4 = v_cnt4.
i_matsum-value4 = v_value4.
APPEND i_matsum.
ENDIF.
ENDLOOP.
ENDFORM. "f_data_preparation
*IMPORTANT , NEED TO CHECK LATER
FORM f_display_data .
IF pck_dtsm = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
*-->display summary
v_topofpage = 'S'.
NEW-PAGE.
PERFORM f_display_summary.
ELSEIF pck_detl = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
ELSEIF pck_summ = 'X'.
*-->display summary
v_topofpage = 'S'.
PERFORM f_display_summary.
ENDIF.
ENDFORM. " f_display_data
FORM f_display_detail .
v_topofpage = 'D'.
SORT i_mat2 BY werks lgort.
*DATA: v_count(5),
DATA: v_count,
v_va1 LIKE i_mat2-value0.
v_va2 LIKE i_mat2-value0,
v_va3 LIKE i_mat2-value0,
v_va4 LIKE i_mat2-value0,
v_va5 LIKE i_mat2-value0.
LOOP AT i_mat2.
WRITE:/2 i_mat2-lgort,
10 i_mat2-matnr,
22 i_mat2-maktx(38),
61 i_mat2-meins,
64 i_mat2-meng0,
82 i_mat2-value0.
100 i_mat2-meng1,
118 i_mat2-value1,
136 i_mat2-meng2,
154 i_mat2-value2,
169 i_mat2-meng3,
186 i_mat2-value3,
204 i_mat2-meng4,
222 i_mat2-value4.
*-->Set counter and add up all values by lgort
v_count = v_count + 1.
v_va1 = v_va1 + i_mat2-value0.
v_va2 = v_va2 + i_mat2-value1.
v_va3 = v_va3 + i_mat2-value2.
v_va4 = v_va4 + i_mat2-value3.
v_va5 = v_va5 + i_mat2-value4.
AT END OF lgort.
WRITE:/10 'Cnt:',
15 v_count,
55 'Subtotal',
82 v_va1.
118 v_va2,
154 v_va3,
186 v_va4,
222 v_va5.
CLEAR v_count. CLEAR v_va1.
CLEAR v_va2. CLEAR v_va3. CLEAR v_va4. clear v_va5.
ENDAT.
ENDLOOP.
ENDFORM. " f_display_detail
FORM f_display_summary .
v_topofpage = 'S'.
LOOP AT i_matsum.
IF NOT i_matsum-cnt0 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt0,
82 i_matsum-value0.
ENDIF.
IF NOT i_matsum-cnt1 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt1,
118 i_matsum-value1.
ENDIF.
IF NOT i_matsum-cnt2 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt2,
154 i_matsum-value2.
ENDIF.
IF NOT i_matsum-cnt3 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt3,
186 i_matsum-value3.
ENDIF.
IF NOT i_matsum-cnt4 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt4,
222 i_matsum-value4.
ENDIF.
ENDLOOP.
ENDFORM. " f_display_summary -
How can we make a call to the Data base in the SAP Scripts?
Hi All,
How we make a call to the data base in scripts?
I think we can use the PERFORM statement to achieve the above functionality.
Pls correct me if i am wrong?
Regards
Abhilash.Hello.
If you want to access database in the script itself (not in print program) yes, you can use PERFORM statement.
In your script, use:
/: PERFORM F_FORM IN PROGRAM ZRFIRFS05
/: USING &VAR1&
/: CHANGING &VAR2&
/: ENDPERFORM
Then, create a program ZPROG (ZRFIRFS05 in my case) with a structure like this one:
REPORT ZRFIRFS05 .
FORM f_form TABLES in_par STRUCTURE itcsy out_par STRUCTURE itcsy.
DATA: l_data1(10).
READ TABLE in_par WITH KEY name = 'VAR1'.
CHECK sy-subrc = 0.
l_data1 = in_par-value.
* SELECT .... "YOUR SELECT TO DATABASE
READ TABLE out_par WITH KEY name = 'VAR2'.
CHECK sy-subrc = 0.
out_par-value = l_data3.
MODIFY out_par INDEX sy-tabix.
ENDFORM.
Regards.
Valter Oliveira. -
How to calculate a column bases on the result of another column?
Hello folks, i need some help with this senario.
I don't know to explain this in a simple way, but i'll give it a go.
I display a report in ApplicationExpress like this
Each row displays a product where the user are going to make a forecast for 18 months ahead.
[productname] [Stock] [sales] [PMonth] [NewstockMonth] [salesmonth1] [ProductionMonth1] [NewstockMonth1] ....
[product1]______[10]____[5]____[0]_________[5]__________[10]_________[10]______________[5]
[product2]______[2 ]____[0]____[0]_________[2]__________[5]__________[10]______________[ 7]
[product3]______[30]____[20]___[0]_________[10]_________[5]_________[10]______________[15]
Stock and sales are results of a function i have in my select.
productionmonth is a text field where the user can edit the production and is saved in the table.
So when the user has entered some inputs in the textboxes, and pressed the submit buttom, the newstockmonth columns
should be calculated from the result i get from the previous month.
newstockmonth = (stock-sales)+productionMonth
newstockmonth1 =(newstockmonth-salesmonth1)+productionmonth1
At this point my submit process has update in a for loop for each row. But i don't quite know how i can calculate every newstockmonth columns.Hi Klaus,
your condition only works if the Shop is in the query. If I understood it correctly you have one query with
Country Shop Total Sales
and one with
Country Number of Shops Total Sales
and you don't want to restrict the second Total Sales but the Total Sales from the first query.
Best regards
Dirk -
How do I restore Firefox base after I reinstalled Windows , but I have my system and program old folders safe. ( exact Firefox Application and Program Files folders etc)?
== This happened ==
Every time Firefox opened
== I reinstalled WindowsWhat I mean is I have saved passwords and some website adresses in my Firefox that was on deleted windows ( but I saved the file system so it works from there using another computer) but all I need is passes and saved links . just the complete copy of my old setups and such . is that possible?
-
Help - How do I sync Ipod to Itunes on New PC without deleting files?
I just got a new PC, installed itunes. All seems to work great.
When I plug in my iphone it will not let me sync to the new computer without "updating" the music. I do plan to import all my music over, but even then I will have over 80 gigs of files, and my 8 gig iphone already has exactly the stuff I want on there.
How can I use my iphone on my new PC without wiping it out?Move all your music, apps, podcasts, etc over to the new PC first and THEN sync your iphone.
It's complaining about having a different library database file - iTunes Library.itl
Copy your entire music folder over to the new PC after installing itunes on the new PC.
Next time you start itunes, your iphone should sync with no problems.
Longer explanation:
http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to -a-new-hard-drive/ -
THERE IS A PROBLEM IN OPENING ANY FILE. WHEN OPENING - A RAPID SUCCESSION OF FILES OPEN, ONE ATOP THE NEXT, WITHOUT SHOWING FILE'S CONTENT. THIS CONTINUES FOR QUITE A WHILE. I MUST TURN OFF COMPUTER. IT IS NOT POSSIBLE TO CHOOSE ANY OTHER FUNCTION WHILE THIS IS HAPPENING, IE : WHEN OPENING A FILE. AS IN , I CANNOT OPEN GOOGLE OR MAIL, ETC. AND THE FILES KEEP OPENING AS UNTITLED. SO I AM NOT ABLE TO OPEN ANY ONE FILE, AND SEE ITS CONTENT, THEY JUST KEEP STACKING LIKE EMTY PAGES ONE ON TOP OF THE NEXT.
THANK YOU
THAT DOES NOT SEEM TO BE THE ANSWER
I HAVE A MAC
BOUGHT IN 2008
AND I DO NOT SEE THAT I HAVE A STUCK KEY
PERHAPS I AM NOT UNDERSTANDING WHAT YOU MEAN -
I have a Macbook pro 10.9.1 that will not communicate with my WD external hard drive. Whenever I connect the drive, this pops up:
NTFS-3G could not mount /dev/disk1s1
at /Volumes/Elements because the following problem occurred:
dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
Referenced from: /usr/local/bin/ntfs-3g
Reason: image not found
I have important photos and videos on here of my family and can't lose them. I tried downloading multiple third party applications like Tuxera and NFTS 3G but they're only trials. How can I permanently set up my mac to read and write without risking to lose all my stuff on the external hard drive. Thanks in advance for any support.babowa, it seems like it is using Fuse & NTFS, so I don't think it's the classic WD + 10.9 mess, but extra WD tools & drivers can still break things MtTran.
MrTran, if you must use unsupported disk formats on your Mac you must also consider actually paying the developers that made the trial software.
It's probably a good idea to follow the developers removal instructions, reboot & then install one tool at a time.
MacFuse, FuseOSX, NTFS-3G are all likley to confict if you run older versions so you need to be sure you are using the latest version. I can't remeber which one depends on the other, so you will need to read the manuals.
When the disk is readable copy the data to another disk. You could probably do this from a Linux distro or Windows if OS X won't do it.
If you insist on only using the trial versions you will need to reinstall Mac OS, copy data off this disk & reformat it.
Is there any good reason for not using the Mac HFS extended format? -
How to get iTunes to update artist/album folder names after editing file metadata
If I edit the metadata for a song, such as the song title, it updates the actual file on my computer as well. However, if I edit the album name or artist name, it does not update the artist or album folders. Is there a way to force iTunes to do this? I have music coming from 3 different sources, Amazon, iTunes, and CD rips, and it's very common for artist names to appear differently from different sources. I'd like to be able to just add everything to iTunes, update any inconsistencies, and then have those changes automaticaly be reflected in my \iTunes Media\Music folder. Is that possible? Otherwise I end up with multiple folders for the same artist.
Check the option to Keep iTunes Media organized under Edit > Preferences > Advanced. The Copy files to iTunes Media folder option should also be checked if you want to make sure that all media is stored under the iTunes Media folders.
Maybe you are looking for
-
Any ideas on how i can resolve and get back to playing my purchased films in itunes Thanks
-
Adding code-coloring to file with nonstandard extension
I have PHP files that end in .ctp, which are basically HTML templates with PHP mixed in (as part of the Cake PHP framework). I'd like them to be parsed for code coloring the same way that the PHP files are, but the text is all black. Is there a way t
-
In Firefox 24.0 -> Tools -> Options -> Applications, I cannot choose a program (hh.exe) to read .chm files. When I choose to open a *.chm file I have only the option of saving it, not to open it. Other browsers like Explorer, chrome, even old netscap
-
How to load an applet in a swing frame?
Hi All, Can any one tell how to load a HTML applet in a Swing frame, I have a requirement where in the swing frame must contain a HTML applet. Thanks in advance... Panneer.
-
Hi, Here there is one scenario,actually there r 2 companycodes A and B so A code is defined all personnel areas all etc., Now the question is to B companycode all these pa,psa.eg,esg is same now this B is to be configuered can u gv me what is the che