SNP PPM Selection Criteria
Hi Experts,
I would be really glad if you could help me regarding this issue.
I have 2 Materials with 2 SNP PPMS. The SNP PPMS were generated by converting PPDS PPMS which was cifed from R/3. The production versions in R/3 has the same validity date.
Lets say for Material A:
- It has 2 production versions and 2 SNP PPMs
- PRD1 and PRD2
- when I had run the SNP location heuristic it had selected PRD1.
Material B
- It has 2 production versions and 2 SNP PPMS
- PRD1 and PRD2
- when I had run the SNP location heuristic it had selected PRD2.
May I kindly ask therefore how PPMs are selected by the APO system in the case of SNP PPMs running SNP location Heuristic? Unless I understand the process, I cannot still create alternative PPMs. I cannot always assign manually the Procurement Priority of all the PPMs generated.
I am really hoping you'd help me regarding this issue.
Thank you so much.
Sincerely Yours,
Ria
Edited by: Ria Montealto on Jul 31, 2008 10:16 AM
Hello ,
As you must be aware the basis for selection of ppm are 'quota arrangment' ,'procurement priority' ,'costs(multilevel cost)' ,'procurement type' .
Kindly refer to following link for more detailed information and how this ranking list can be changed. "http://help.sap.com/saphelp_scm2007/helpdata/en/1c/4d7a375f0dbc7fe10000009b38f8cf/frameset.htm ".
Also if all the parameters are same , it will refer to nomenclature of the ppm as the ppm name contains the version number ciffed from r/3.
For example, if there are versions "0001 " and "0002 " in r/3 and these versions are ciffed to APO to create ppm .
The snp hueristics will select the ppm of prod. version 0001 .
Thanks & Regards
Abhijit S Nakhwa
Similar Messages
-
Upload single level variable cost in SNP PPM in mass by MASSD
Hi experts,
I am trying to upload single level variable cost in SNP PPM in mass by MASSD by following selections:-
Selection
Object Type:- PPM
Selction Criteria:-
Component:- Plan Attrib:- Use of Plan
Component:- Plan Attrib:- Plan
Components & Attributes to be Maintained
Component:- Plan Attrib:- Var.Sing.Lvl Costs
While maintaining the cost, under selection criteria, compoment: PLAN and attribute: PLAN I am unable to maintain multiple plan names.
The single level variable cost that I have to maintain for all these plans is the same and therefore was trying to use transaction MASSD
Can you please throw some light on how multiple PLAN selections can be done?
Regards
ChetanDEAR GURUS,
*There is a question regarding the resoucre consumptions relevant to PDS in SNP,*
****The inputs are:****
****1) Base Qty= 7700 TH****
****2) Set Up =45 MIN****
****Resource consumed by operation activity is 112 207 seconds = 31,17 hours.****
****Unfortunately we didnu2019t understand how this figure is calculated.****
****Can you please help us in this**** -
Mass Upload of Define Mode Combinations_PPDS to SNP PPM
Dear All ,
I am converting huge numbers of PPDS PPMs to SNP PPMs , I would need your support in telling me a mass upload ( program ) for defining Mode Combinations transaction .
As such a BDC has been prepared but that takes a very long time for pushing data in this transaction .
Thanks and Regards ,
Prashant KumarDear Murali ,
I have specific field values e.g. variable lot size , without PPDS Campaign , Blank Mode Combination to be selected .
When we select the PPDS PPM no. or Product Location Combination inserting all these values in the table after execute done on the selection screen needs manual entry of all the field values .
Data is really very huge and was wondering if there could be a quicker way out . There is more SNP PPM converted from PPDS PPM due to alternate modes of 10-15 in many of the PPDS PPMs .
Would appreciate any further help .
Thanks and Best Regards ,
Prashant Kumar -
Hi
I want to create a only SNP PPM when a Routing is CIFed from R3. currently, we are getting the PPDS PPM.
pl let me know, where will be the setting to create SNP PPM directly in APO.
Thanks
JKHi JK :
SNP PPM can not be generated from R/3 directly .
It can be manually created in APO through transaction SCC03 .
Also if you dont want to create it manually then you can do through this , when you CIF BOM & routing , A PPDS ppm gets created in APO .
This can be converted into SNP PPM , It is also possible to convert for the whole plant in one go or can select certain products for a plant.
SNP PPM is generated in APO based upon existing PPDS PPM . So, every time an R/3 recipe or BOM is changed, the PPDS plan will automatically be updated. However the equivalent SNP plan must be regenerated manually to account for the R/3 changes.
there are two steps :
selection of the required plans via /n//SAPAPO/OO_PPM_CONV
& conversion of those selection plans /n/SAPAPO/PPM_CONV_310. -
SNP PPM Generation after the delta change in PPDS PPM
Dear Colleagues,
In oss note 1172838 SAP AG states that there is no auto link to
generate SNP PPMs from PPDS PPMs,when PPDS PPMs are changed from R/3
and recommends the customers to do that manually.
Yes, that is possible if the company uses not more that 50-100 PPMs,
but that is not the case in our business.
We have ~10000 SNP PPMs and it is impossible to track the changes and
update the PPMs manually.
What we need (when there is a change in PPDS PPM) is a report which will:
1. Delete SNP PPM with invalid mode combination and the Production
(Planned) orders which use that PPM. The old SNP PPM must be deleted as
the existing name of SNP PPM is required.
2. Create a new mode combination taking into account the changes in the
PPDS PPM.
Then we will run transaction /SAPAPO/PPM_CONV_310 and generate the new
SNP PPMs.
Task in point 1 can be done with transaction /SAPAPO/PPM_DEL,
but it does NOT give us the possibility to select only SNP PPMs
with invalid/obsolete mode combinations. Besides that it can not be run in
background, but in foreground.
Would you share you experience if you have faced the same/similar problem.
Best Regards,
Alper MyumyunHi Senthil,
The problem is that the mentioned check does not work. I have even opened an oss message where I have got the following answer:
First you have to re-generate the SNP PPM (invalidity of the old mode combination will be generated) and then the
check will warn you about the invalidity.
This is so because at the first stage there is no issue of it being obsolete until a new one is created.
At the point that you Generate SNP PPM is when the mode invalidity is generated and not before. So its not possible for the warning to have come when there is no invalidity.
/SAPAPO/SAPLSCC_CPIT2 looks scary. There are tons of includes in it. Would you specify which one is used for the mentioned check? INCLUDE /SAPAPO/LSCC_CPIT2F09?
Thanks for your help. -
Selection Criteria addition-Not working
Hi!
I have this report wherein I need to add two fields VBAP-Kunnr and knvv-konda in the selection screen so that I can do my drill down or search criteria based upon these two selections also apart from the existing ones, but unfortunately I am unable to get throiugh this and somehow putting this two selections in the selection criteria its not taking any effect or its just actinga dummy selection and I am unale to drill down my report based upon those. Can anyone have a look and let me know what could be the problem please. Help would be highly appreciated.
Thanks
*& Include ZSD_PFGENERATETOP Report ZSD_PFGENERATE
REPORT zsd_pfgenerate LINE-SIZE 170 LINE-COUNT 65.
TABLES: lips, likp, vbap, vbak, vbrp, vbpa, vbrk.
CONSTANTS: cns_vgtyp TYPE vbrp-vgtyp VALUE 'J',
cns_intyp TYPE vbrk-vbtyp VALUE 'M',
cns_vkorg TYPE vbak-vkorg VALUE 'CA01',
cns_vkorg_US type vbak-vkorg value 'US01', "DEVK903521
cns_parsh TYPE vbpa-parvw VALUE 'WE',
cns_parsp TYPE vbpa-parvw VALUE 'AG',
cns_parre type vbpa-parvw value 'RE', "bill-to
cns_auzwp TYPE vbak-auart VALUE 'ZWP',
cns_auzct TYPE vbak-auart VALUE 'ZCT',
cns_auzif TYPE vbak-auart VALUE 'ZIF',
cns_auztm TYPE vbak-auart VALUE 'ZTM',
cns_fkff TYPE vbrk-fkart VALUE 'ZFF5',
cns_fkos TYPE vbrk-fkart VALUE 'ZOF5',
cns_upd(1) TYPE c VALUE 'S',
cns_mode(1) TYPE c VALUE 'N'.
Internal Tables and Work Areas
DATA: BEGIN OF it_vbpos OCCURS 0,
werks TYPE vbap-werks,
audat TYPE vbak-audat,
auart TYPE vbak-auart,
kunag TYPE vbak-kunnr,
name1_ag TYPE kna1-name1,
kunsh TYPE likp-kunnr,
name1_sh TYPE kna1-name1,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
vbdel TYPE likp-vbeln,
psdel TYPE lips-posnr,
kunre type kunre, "Bill-to Party
name1_re type kna1-name1, "Bill-to Party Name
END OF it_vbpos,
BEGIN OF it_vbpos_temp OCCURS 0,
vgbel TYPE lips-vgbel,
vgpos TYPE lips-vgpos,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
END OF it_vbpos_temp,
BEGIN OF it_report OCCURS 0,
werks TYPE vbap-werks,
vbeln TYPE vbak-vbeln,
vbdel TYPE likp-vbeln,
audat TYPE vbak-audat,
auart TYPE vbak-auart,
name1_ag TYPE kna1-name1,
name1_sh TYPE kna1-name1,
name1_re type kna1-name1, "Bill-to Party Name
mark(1) TYPE c,
END OF it_report,
BEGIN OF it_vbeln OCCURS 0,
vbeln TYPE vbak-vbeln,
END OF it_vbeln,
wa_vbeln LIKE LINE OF it_vbeln,
wa_vbpos LIKE LINE OF it_vbpos,
wa_report LIKE LINE OF it_report,
wa_sel LIKE LINE OF it_report.
DATA: it_vbrp type table of vbrp,
it_vbrk type table of vbrk.
BDC Variables
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
DATA: wa_bdc LIKE LINE OF bdc_tab,
it_bdcmess TYPE TABLE OF bdcmsgcoll.
*& Selection-Screen definition
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
PARAMETERS: p_rdff TYPE c RADIOBUTTON GROUP rad1 DEFAULT 'X',
p_rdos TYPE c RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK block2.
SELECTION-SCREEN BEGIN OF BLOCK block0 WITH FRAME TITLE text-000.
SELECT-OPTIONS: s_werks FOR vbap-werks OBLIGATORY NO INTERVALS,
s_auart FOR vbak-auart,
s_kunag FOR vbak-kunnr, "Sold-to Party
s_kunnr FOR likp-kunnr, "Ship-to Party
s_kunre for vbak-kunnr, "Bill to Party
s_vdatu FOR vbak-vdatu OBLIGATORY.
SELECTION-SCREEN END OF BLOCK block0.
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
PARAMETERS: p_vgbel TYPE vbak-vgbel.
SELECTION-SCREEN END OF BLOCK block1.
selection-screen begin of block block3 with frame title text-003.
parameters: p_billed RADIOBUTTON GROUP r1,
p_delvd RADIOBUTTON GROUP r1 default 'X',
p_all RADIOBUTTON GROUP r1.
selection-screen end of block block3.
*& Include ZSD_PFGENERATEE01
START-OF-SELECTION.
PERFORM read_report.
END-OF-SELECTION.
SET PF-STATUS 'STAT1000'.
IF it_vbpos[] IS INITIAL.
MESSAGE s999(z001) WITH 'No Data Selected for this criteria'.
ELSE.
PERFORM show_report.
ENDIF.
*& List Events
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'SELE'.
LOOP AT it_report INTO wa_report.
wa_report-mark = 'X'.
MODIFY it_report FROM wa_report.
ENDLOOP.
PERFORM show_report.
WHEN 'DSEL'.
LOOP AT it_report INTO wa_report.
wa_report-mark = ''.
MODIFY it_report FROM wa_report.
ENDLOOP.
PERFORM show_report.
ENDCASE.
AT LINE-SELECTION.
DO.
READ LINE sy-index FIELD VALUE wa_report-mark wa_report-vbeln
wa_report-vbdel.
IF sy-subrc NE 0.
EXIT.
ELSE.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_report-vbeln
IMPORTING
output = wa_report-vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_report-vbdel
IMPORTING
output = wa_report-vbdel.
READ TABLE it_report INTO wa_sel
WITH KEY vbeln = wa_report-vbeln.
IF sy-subrc EQ 0.
wa_sel-mark = wa_report-mark.
MODIFY it_report FROM wa_sel INDEX sy-tabix.
ENDIF.
ENDIF.
ENDDO.
REFRESH: it_vbeln.
LOOP AT it_report INTO wa_report WHERE mark EQ 'X'.
CASE 'X'.
WHEN p_rdff.
wa_vbeln = wa_report-vbdel.
WHEN p_rdos.
wa_vbeln = wa_report-vbeln.
ENDCASE.
APPEND wa_vbeln TO it_vbeln.
ENDLOOP.
SORT it_vbeln BY vbeln.
DELETE ADJACENT DUPLICATES FROM it_vbeln.
IF NOT it_vbeln[] IS INITIAL.
PERFORM process_vf01.
ENDIF.
*& Include ZSD_PFGENERATEF01
*& Form read_report
Routine to read applicable orders from database
FORM read_report.
DATA: lwa_lips TYPE lips,
lc_vbeln TYPE vbrk-vbeln.
Retrieve sales orders based on selection criteria where billing doc has not been
created for the delivery yet
REFRESH: it_vbeln, it_vbpos, it_report.
Select into table based on Onsite/Fixed Facility
CASE 'X'.
WHEN p_rdff.
changed for performance reasons (i.e. time-out)
k~vgbel is not in it_vbpos but was in select statment ?
SELECT vbap~werks vbak~audat vbak~auart vbak~kunnr AS kunag
vbak~vbeln vbap~posnr
INTO CORRESPONDING FIELDS OF TABLE it_vbpos
FROM vbak INNER JOIN vbap
ON vbak~mandt = vbap~mandt
AND vbak~vbeln = vbap~vbeln
WHERE vbap~werks IN s_werks
AND vbak~vdatu IN s_vdatu
AND vbak~vkorg in (cns_vkorg,cns_vkorg_US)
AND vbap~oid_ship IN s_kunnr
AND vbak~kunnr IN s_kunag
AND vbak~auart IN s_auart
AND ( vbak~auart = 'ZWP' or vbak~auart = 'ZIF' or
vbak~auart = 'ZCT' or vbak~auart = 'ZTM' or
vbak~auart = 'ZOIL' ).
IF SY-SUBRC = 0.
SELECT vgbel vgpos vbeln posnr FROM lips
INTO CORRESPONDING FIELDS OF TABLE it_vbpos_temp
FOR ALL ENTRIES IN it_vbpos
WHERE vgbel = it_vbpos-vbeln
AND vgpos = it_vbpos-posnr
%_hints oracle 'index ("LIPS" "LIPS~Z01")'.
SORT it_vbpos_temp by vgbel vgpos.
LOOP AT it_vbpos.
READ TABLE it_vbpos_temp
WITH KEY vgbel = it_vbpos-vbeln vgpos = it_vbpos-posnr
BINARY SEARCH.
IF SY-SUBRC = 0.
it_vbpos-vbdel = it_vbpos_temp-vbeln.
it_vbpos-psdel = it_vbpos_temp-posnr.
modify it_vbpos.
ENDIF.
ENDLOOP.
ENDIF.
WHEN p_rdos.
SELECT k~vbeln p~posnr k~kunnr AS kunag k~audat k~auart p~werks k~vgbel
INTO CORRESPONDING FIELDS OF TABLE it_vbpos
FROM vbak AS k INNER JOIN vbap AS p ON k~vbeln = p~vbeln
WHERE p~werks IN s_werks AND k~vdatu IN s_vdatu AND
k~vkorg in (cns_vkorg,cns_vkorg_US) AND "DEVK903521
k~vgbel EQ p_vgbel AND
k~kunnr IN s_kunag AND k~auart IN s_auart AND
p~oid_ship IN s_kunnr.
ENDCASE.
Determine if delivery has been billed out, if not can create PF Invoice - CHANGED
LOOP AT it_vbpos INTO wa_vbpos.
Check Ship-to in
SELECT SINGLE kunnr INTO wa_vbpos-kunsh FROM vbpa
WHERE parvw EQ cns_parsh AND vbeln EQ wa_vbpos-vbeln.
IF sy-subrc NE 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
Check for Bill-to
select single kunnr into wa_vbpos-kunre from vbpa
where parvw eq cns_parre and vbeln eq wa_vbpos-vbeln
and kunnr in s_kunre.
IF sy-subrc NE 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
Get Partner Texts
SELECT SINGLE name1 INTO wa_vbpos-name1_ag FROM kna1
WHERE kunnr EQ wa_vbpos-kunag.
SELECT SINGLE name1 INTO wa_vbpos-name1_sh FROM kna1
WHERE kunnr EQ wa_vbpos-kunsh.
SELECT SINGLE name1 INTO wa_vbpos-name1_re FROM kna1
WHERE kunnr EQ wa_vbpos-kunre.
CASE 'X'.
WHEN p_rdff.
IF p_delvd = 'X'.
optimized for performance reasons i.e. time-out
Check if delivery has been billed out
SELECT SINGLE k~vbeln INTO lc_vbeln
FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
k~fksto NE 'X'.
refresh: it_vbrp, it_vbrk.
select vbeln from vbrp
into corresponding fields of table it_vbrp
where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
and vgpos = wa_vbpos-psdel
%_hints oracle 'index ("VBRP" "VBRP~Z01")'.
if sy-subrc = 0.
sort it_vbrp by vbeln.
delete adjacent duplicates from it_vbrp comparing vbeln.
select vbeln from vbrk
into corresponding fields of table it_vbrk
for all entries in it_vbrp
where vbeln = it_vbrp-vbeln
and vbtyp = cns_intyp and fksto 'X'.
IF sy-subrc EQ 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
endif.
ELSEIF p_billed = 'X'.
Check if delivery hasn't been billed out
SELECT SINGLE k~vbeln INTO lc_vbeln
FROM vbrp AS p INNER JOIN vbrk AS k ON p~vbeln = k~vbeln
WHERE p~vgtyp EQ cns_vgtyp AND p~vgbel EQ wa_vbpos-vbdel AND
p~vgpos EQ wa_vbpos-psdel AND k~vbtyp EQ cns_intyp AND
k~fksto NE 'X'.
refresh: it_vbrp, it_vbrk.
select vbeln from vbrp
into corresponding fields of table it_vbrp
where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
and vgpos = wa_vbpos-psdel
%_hints oracle 'index ("VBRP" "VBRP~Z01")'.
if sy-subrc = 0.
sort it_vbrp by vbeln.
delete adjacent duplicates from it_vbrp comparing vbeln.
select vbeln from vbrk
into corresponding fields of table it_vbrk
for all entries in it_vbrp
where vbeln = it_vbrp-vbeln
and vbtyp = cns_intyp and fksto 'X'.
IF sy-subrc NE 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
endif.
ENDIF.
WHEN p_rdos.
IF p_delvd = 'X'.
Check if order has been billed out
SELECT SINGLE * FROM vbrp
WHERE vbeln EQ wa_vbpos-vbeln AND
vgpos EQ wa_vbpos-posnr.
IF sy-subrc EQ 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
ELSEIF p_billed = 'X'.
Check if delivery hasn't been billed out
SELECT SINGLE k~vbeln INTO lc_vbeln
FROM vbrp AS p INNER JOIN vbrk AS k ON pvbeln = kvbeln
WHERE pvgtyp EQ cns_vgtyp AND pvgbel EQ wa_vbpos-vbdel AND
pvgpos EQ wa_vbpos-psdel AND kvbtyp EQ cns_intyp AND
k~fksto NE 'X'.
refresh: it_vbrp, it_vbrk.
select vbeln from vbrp
into corresponding fields of table it_vbrp
where vgtyp = cns_vgtyp and vgbel = wa_vbpos-vbdel
and vgpos = wa_vbpos-psdel
%_hints oracle 'index ("VBRP" "VBRP~Z01")'.
if sy-subrc = 0.
sort it_vbrp by vbeln.
delete adjacent duplicates from it_vbrp comparing vbeln.
select vbeln from vbrk
into corresponding fields of table it_vbrk
for all entries in it_vbrp
where vbeln = it_vbrp-vbeln
and vbtyp = cns_intyp and fksto 'X'.
IF sy-subrc NE 0.
DELETE TABLE it_vbpos FROM wa_vbpos.
CONTINUE.
ENDIF.
endif.
ENDIF.
ENDCASE.
MOVE-CORRESPONDING wa_vbpos TO wa_report.
APPEND wa_report TO it_report.
MODIFY it_vbpos FROM wa_vbpos.
ENDLOOP.
if 'onsite field summary', then process by release sales orders
IF p_rdos = 'X'.
sort it_report by vbeln.
delete adjacent duplicates from it_report comparing vbeln.
else.
SORT it_report BY werks name1_ag name1_sh vbeln.
DELETE ADJACENT DUPLICATES FROM it_report.
endif.
SORT it_report BY name1_sh werks name1_ag vbeln.
ENDFORM. " read_report
*& Form process_vf01
Call transaction VF01 and fill screen table with order values
FORM process_vf01.
DATA: ln_index(2) TYPE n,
lc_field(20) TYPE c,
lc_fkart TYPE vbrk-fkart,
li_lines TYPE i,
lc_msgtxt(99) TYPE c,
lwa_bdcoptions TYPE ctu_params,
lwa_mess LIKE LINE OF it_bdcmess.
REFRESH: it_bdcmess.
lwa_bdcoptions-dismode = cns_mode.
lwa_bdcoptions-updmode = cns_upd.
CASE 'X'.
WHEN p_rdff.
lc_fkart = cns_fkff.
WHEN p_rdos.
lc_fkart = cns_fkos.
ENDCASE.
REFRESH: bdc_tab.
PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
' ' 'BDC_CURSOR' 'RV60A-FKART',
' ' 'RV60A-FKART' lc_fkart,
' ' 'BDC_OKCODE' '/00'.
LOOP AT it_vbeln INTO wa_vbeln.
ln_index = sy-tabix.
Up to the second delivery of the BDC add the Delivery to the screen, after that click the More Documents for every entry. logic changed for DEVK902353
CASE ln_index.
WHEN 1.
CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
WHEN 2 OR 3.
IF p_rdos 'X'.
CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
'X' 'SAPMV60A' '0102',
' ' 'BDC_OKCODE' 'FKAN'..
ELSE.
CONCATENATE 'KOMFK-VBELN' '(' ln_index ')' INTO lc_field.
PERFORM update_bdc USING: ' ' lc_field wa_vbeln.
ENDIF.
WHEN OTHERS.
If p_rdos 'X'.
CONCATENATE 'KOMFK-VBELN' '(2)' INTO lc_field.
PERFORM update_bdc USING: ' ' lc_field wa_vbeln,
'X' 'SAPMV60A' '0102',
' ' 'BDC_OKCODE' 'FKAN'.
endif.
ENDCASE.
ENDLOOP.
VF01 will go to a different screen if only one line selected
DESCRIBE TABLE it_vbeln LINES li_lines.
IF li_lines EQ 1.
PERFORM update_bdc USING: 'X' 'SAPMV60A' '0104',
' ' 'BDC_OKCODE' '=SICH'.
ELSE.
PERFORM update_bdc USING: 'X' 'SAPMV60A' '0102',
' ' 'BDC_OKCODE' '=SICH'.
ENDIF.
CALL TRANSACTION 'VF01' USING bdc_tab OPTIONS FROM lwa_bdcoptions
MESSAGES INTO it_bdcmess.
WRITE: / 'BDC Messages:'.
SKIP.
LOOP AT it_bdcmess INTO lwa_mess.
CALL FUNCTION 'RH_MESSAGE_GET'
EXPORTING
arbgb = 'VF'
msgnr = lwa_mess-msgnr
msgv1 = lwa_mess-msgv1
msgv2 = lwa_mess-msgv2
msgv3 = lwa_mess-msgv3
msgv4 = lwa_mess-msgv4
IMPORTING
msgtext = lc_msgtxt
EXCEPTIONS
message_not_found = 1
OTHERS = 2.
WRITE: /5 lc_msgtxt.
ENDLOOP.
ENDFORM. " process_vf01
form update_bdc *
subroutine to add the data to the bdc table for trans. vf01 *
FORM update_bdc USING dynpro field content.
CLEAR bdc_tab.
IF dynpro EQ 'X'.
bdc_tab-program = field.
bdc_tab-dynpro = content.
bdc_tab-dynbegin = 'X'.
ELSE.
bdc_tab-fnam = field.
bdc_tab-fval = content.
ENDIF.
APPEND bdc_tab.
ENDFORM. "UPDATE_BDC
*& Form show_report
Report to Display Available Orders on Screen
FORM show_report .
DATA: l_idx TYPE i.
WRITE: / 'Available Orders/Deliveries for Plant:'.
LOOP AT s_werks.
WRITE: s_werks-low.
ENDLOOP.
SKIP.
FORMAT INTENSIFIED ON COLOR COL_HEADING.
WRITE: /5 text-h01, text-h02.
CASE 'X'.
WHEN p_rdff.
WRITE: text-h06.
ENDCASE.
WRITE: text-h03, text-h04, text-h05, text-h07,
/ sy-uline.
FORMAT INTENSIFIED OFF COLOR OFF.
l_idx = 0.
LOOP AT it_report INTO wa_report.
IF l_idx EQ 0.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
l_idx = 1.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
l_idx = 0.
ENDIF.
WRITE: / wa_report-mark AS CHECKBOX,
wa_report-auart UNDER text-h01,
wa_report-vbeln UNDER text-h02.
CASE 'X'.
WHEN p_rdff.
WRITE: wa_report-vbdel UNDER text-h06.
ENDCASE.
WRITE: wa_report-audat UNDER text-h03,
wa_report-name1_ag UNDER text-h04,
wa_report-name1_sh UNDER text-h05,
wa_report-name1_re under text-h07.
HIDE: wa_report-mark, wa_report-vbeln, wa_report-vbdel.
ENDLOOP.
ENDFORM. " show_report
Thanks for your kind help.
Aarav.Hi, Anne-Marie;
You may be running into a common issue that is docuemented here:
[SelectionFormula|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do]
Regards,
Jonathan
Edited by: Jonathan Parminter on Mar 16, 2009 8:03 AM -
Report for Sales and purchase tax (selection criteria-Tax code)
Hi
I have one query for sales tax details which gives me detail for all A/R invoices and taxes involved in it. But i want that while executing query system should ask tax code and gives detail of tax amount in front of item and invoice according to tax code selected.
The query is:
SELECT M.DocNum AS 'Inv.No ', M.DocDate as 'Date', M.CardName as 'Customer Name',L.Dscription,L.Quantity,L.Price, (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)', (SELECT Avg(TaxRate) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ', (SELECT Avg(TaxRate) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT % ', (SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as ' TAXEXEMPT ', (SELECT Avg(TaxRate) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as ' VAT% ', (SELECT Sum(TaxSum) FROM INV4 where statype=8 and DocEntry=M.DocEntry) as 'VAT12.5 ', (SELECT Avg(TaxRate) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST 2% ', (SELECT Sum(TaxSum) FROM INV4 where statype=9 and DocEntry=M.DocEntry) as ' CST @2 ', (SELECT Avg(TaxRate) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST % ', (SELECT Sum(TaxSum) FROM INV4 where statype=11 and DocEntry=M.DocEntry) as ' CENVCST ', (SELECT Avg(TaxRate) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as ' BED ', (SELECT Avg(TaxRate) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess% ', (SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as ' Cess ', (SELECT Avg(TaxRate) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' HCess % ', (SELECT Sum(TaxSum) FROM INV4 where statype=-55 and DocEntry=M.DocEntry) as ' Hcess ', L.LineTotal as 'Row Total (Rs.)',M.DocTotal as 'Doc Total' FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND TargetType ! = 14 GROUP BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal ORDER BY M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,L.Dscription,L.Quantity,L.Price,L.LineTotal,M.DocTotal
I want 2 queries which asks tax code during selection criteria for both cases sales and purchase.Hi Malhotra,
Try this,
1st remove the FROM/TO Doc. Date where Condition in your Query report.
AND add the below where condition in your Query report.
WHERE statype = '[%0]'
OR
Try this Query Report.
SELECT
M.DocNum as 'A/R Invoice No.',
M.DocDate as 'Inv. Date',
M.CardCode as 'Customer Code',
M.CardName as 'Customer Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
L.LineTotal,
L.TaxCode,
L.[VatSum],
M.WTSum AS 'TDS (Rs.)',
M.DocTotal as 'Total (Rs.)'
FROM OINV M
LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
WHERE
(M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')
AND
L.TaxCode='[%2]'
GROUP BY
M.DocNum,M.DocDate,M.CardCode,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
L.LineTotal,M.DocEntry,M.[DiscSum],L.TaxCode,L.[VatSum],M.WTSum,M.DocTotal
ORDER BY
M.DocNum,M.DocDate,M.CardCode,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
L.LineTotal,M.DocEntry,M.[DiscSum],L.TaxCode,L.[VatSum],M.WTSum,M.DocTotal
Regards,
Madhan. -
PS report: multible selection for report selection criteria
Is there a possibility to define multible selections in the report selection variables of a PS hierarchy report?
I tried to define them via
CJE6 -> EDIT -> General data selction
and entered valiables in the FROM column and the TO column. But when I execute the report it will not show multible selction, but only single selection. Also, I did not find a SAP standard report which has multible selection in the report selection criteria screen.
I found the multible selections only in the DB profile selection screen and the dynamic selection, but that is not the solution I am searching for.
Can anybody kindly help me with this?E.g. S_ALR_87013532
here you can see multible selection in the DB profile selection group, but not in the report selection group. I would like to use multible selection in the report selection group, as mentioned above.
I am aware of the possibility of creating a new DB profile, but this is only my option B. -
Hide Particular Item Group from Selection Criteria of Sales Analysis Report
Hello Experts,
Is this possible to Hide Particular Item Group from Selection Criteria of Sales Analysis Report?
I have one Item Group as 'Special Items'.
Now, when I open Item wise sales analysis report, I want to hide above mentioned group from selection criteria.
Thanks in advance.
Best Regards,
Pankit ShethHi,
1. Not possible to put validation for selection criteria windows.
2. In standard, I don't think it is possible to hide only one item group.
3. Alternatively don't give authorization to user for running sales reports. If still need create customized query and ask user run every month.
Thanks & Regards,
Nagarajan -
Selection criteria are not applied to summary fields on group footers.
I wonder if anyone can help me with this problem. I am using Crystal reports version 11.2, and my data source is a Sql Server view.
The records on the view have a date field, and I have selected all records within a given date range in "Selection Formulas".
The records are then grouped, and the Crystal summary facility used to summarise number fields on the group footers.
So for example, if my view contains four records, one with field "amount" = 2, one with field "amount" = 8, one with field "amount" = 6, one with field "amount" = 3, but only the first two records are within the valid date range, you would expect to see the first two records listed out at detail level, then field "amount" summarised at group level, with a summarised value of 10.
ie .... record1 2
record2 8
group level total 10
This works fine when I run the report using Crystal's "print preview" facility. However, when the report is run from within an application written in C#.NET, the selection criteria are not applied to the summary field, so you get ..
record1 2
record2 8
group level total 19
I tried putting the date selection criteria at both record and group level, but that did not work.
I googled the problem and found an article explaining that Crystal first performs the record-level selection, then it creates the groups and totals up any summary fields, and only then does it apply the group-level selection criteria, which can lead to problems like the one I have described above. However, since I have put my date selection criteria at both record and group level, I do not understand why I still get the problem.
In one report I got round this problem by creating a formula that returned zero if the record date was outside of the valid date range, and returned the number field to be summarised if the date was valid, then summarising that formula, instead of summarising the number field directly.
In other reports I created one formula to set a shared variable as zero, then another formula to accumulate it at detail record level, then another formula to display the variable at the group footer. In other words, I did not bother with the Crystal summary facility at all, but created my own summary facility.
While googling the problem to see what other people did in this situation, I noticed that most fixes used variations of the "shared variables and formulae" fix to get round the problem.
The problem is that I have lots of complex reports and it will take ages to replace the summarised fields with shared variables and formulae. The reports were initially tested with "Print Preview" so we did not notice this problem until the C#.Net application was ready to use them. And I can't believe that you are simply meant to ignore the summary facility and re-invent the wheel by doing it all manually.
Please tell me that there is something simple that I have been doing wrong!!! If I have not given enough information for you to answer, please let me know.
Thanks,
Anne-MarieHi, Anne-Marie;
You may be running into a common issue that is docuemented here:
[SelectionFormula|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do]
Regards,
Jonathan
Edited by: Jonathan Parminter on Mar 16, 2009 8:03 AM -
Need to take part of selection criteria out of a custom report (R painter)
Hi Experts..
I have a requirement to hide cost elements/group which appear as part of selection criteria on our custom report (report painter) for projects.
1. Why this appears as part of the selection criteria as i did not find this defined in Edit --> General data selection. (I only found CO area, Valuation, Fiscal year, Period, and Object in there).
2. We have found a system performance issue when a user put in cost elements for selection. So I am required to take this out. I thought i can just take this out from General data selection.. If I can't find it in there, where would i be able to do that??
3. Suppose I would hide this selection by creating a screen variant.. I was looking in SHD0
but its not working with our Z T.Code...it display the error message "Variants are possible only for dialog transactions"... This does not seem to work with a custom t-code. Then how would I do this ????
Please help clarify on this ....
Thanks....
Monica
Edited by: Monica Kong on Aug 24, 2008 6:01 AMHi Monica,
I believe we have an executable report here...
go to se38 -> enter program name -> click on "attributes" button -> display
We can see the type as 'Executable' or 'Modulepool'
generally a selection screen is brought by using keywords 'Parameters' or 'select-options' in Executable programs and with screen in modulepool ..although we can use a combination of both in some cases
So in your program..
check for keywords
'Parameters'/'Select-options'
The best way to proceed is to press F1 on the field that needs to be removed from selection...note the details
"screen number" and "screen field"
(1)By default screen number = 1000 if it is an executable program
Now see the scrren field ..if it is select-options it will something like field-low or field-high
so in the report
search for field for cost center and group with keyword starting as parameters or select-options and comment the same
Remember to comment tte fields throughout the program since this field will be used in multiple locations
(2) if it is modulepool program note the screen number , go the program and screen and remove the field from screen painter and comment the fields where ever used in the program
Also note that using screen variant is a good option but done if user needs specific settings on a report or we need the original report as it is plus additional report with few variations
Hope it helps
Pls check and revert
Regards
Byju -
Work Order Reporting using I_BEGRP as a selection criteria
Hello all,
I am having a small problem regarding the authorization object I_BEGRP, which appears at general data informed tab at equipment level. The situation is as described below:
Our client has several subcontractors working with Maintenance Work Orders in the system, and in order to control that each subcontractor does only access to their own data (equipment, work orders, etc.) different authorization group has been used to assign each of the equipment.
Problem is now when the client needs to be able to know the list of MWO per subcontractor.
The need is clear: for a user that is not restricted by this authorization group, it cannot be usedas a selection criteria to obtain a list of WO of a certain subcontractor.
I have seen that it can be shown in the equipment standard report IH08, but only as exit data, but not as entry selection criteria, but neither for MWO (IW39) nor for notifications (IW29) it can be used as an entry selection criteria.
Can someone help me with this issue? is the only solution to make a custom development, and to copy program RIAUFK20 in order to allow this field as an input?
Thank you very much for your help.
BR,
Francesc.Hi,
the only workaround I can think of is to use suitable search help for equipment. So the process would be to run IW29, open search help for equipment that allows you to specify authorization group (I think Equipment by Equipment list should work), then select all equipments from the auth. group and then run IW29 restricted by equipments. It's not nice but it allows you to select all orders that have equipments assigned to some specific authorization group. Otherwise you need to enhance standard reports to allow authorization group as one of the select options.
Cheers -
Displaying selection criteria in ALV report output
Hello,
Ive been using REUSE_ALV_GRID_DISPLAY function module to display my report content in ALV.
My reports selection criteria has parameters, select options, checkboxes and radio buttons. As part of the ALV output, I want to display the criteria that the user had selected in the selection screen. I was hoping to do that via parameter "i_callback_top_of_page" and fill the selection criteria in the header area. I'm using REUSE_ALV_COMMENTARY_WRITE to fill the header area.
However, the header area takes too much of view space in the output if I put all the selection screen information in it.
Is there a way to make the header area scrollable? What is a good way of displaying the selection criteria information as part of the report output?
Appreciate your help.
ssHi SS,
1. The purpose of displaying / writring
selection information
in alv is
for identifying what the user has seleccted,
directly from the report (when its printed)
2. So, the option of priting/writing
it on the TOP of alv, is ok.
3. However, U can also choose to WRITE
it at the BOTTOM (instead of top)
4. Try to utilise maximum spacing (horizontally)
field1 : abcd fidl2 = xyz field3 = ppp
field4 : mnc etc. etc.
regards,
amit m. -
Display/Print the Selection criteria entered by USER on the ALV Report o/p?
Hi Experts,
I hv a requirement of to print/display the Selection criteria entered by user in the selection screen.........on the top portion of the ALV report output lay out.
There is a FM for this purpose, but, I forgot its name!!
So, let me know the FM or FMs, so that, will choose, which is best one,
or the piece of code, which covers all select-option entries..........appreciated.
thanq
Edited by: SAP ABAPer on Sep 3, 2008 6:35 PMUse the Function RS_REFRESH_FROM_SELECTOPTIONS get the selection details, now format the data accordingly in the TOP_OF_PAGE using the calss CL_DD_DOCUMENT.
Check the below mention code.
REPORT ztest_page.
TABLES: sflight.
DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
DATA BEGIN OF it_sel_opt OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA END OF it_sel_opt.
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE it_flight
WHERE carrid IN s_carrid.
END-OF-SELECTION.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = it_sel_opt
EXCEPTIONS
not_found = 01
no_report = 02.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_html_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'SFLIGHT'
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form top_of_page
* text
* -->DOCUMENT text
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA : dl_text(255) TYPE c. "Text
* Add new-line
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CLEAR : dl_text.
* program ID
dl_text = 'Program Name :'.
CALL METHOD document->add_gap.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_heading_int.
CLEAR dl_text.
dl_text = sy-repid.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
dl_text = 'Selection Criteria'.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
CONCATENATE 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
LOOP AT it_sel_opt.
CLEAR : dl_text.
CONCATENATE it_sel_opt-selname it_sel_opt-sign
it_sel_opt-option it_sel_opt-low it_sel_opt-high
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
ENDLOOP.
ENDFORM. "top_of_page -
Profit center report does not show selection criteria
Hi,
The SAP Business One software misses a functionality :
When creating a financial report, you can enter surtain selection criteria in order to shift the data, and in order to get only the relevant data. This is possible in all reports. Also, in the result of all reports, those selection criteria are shown. In that case you actually know what the data is all about.
This is not the case with the profit center report. When you run the report with e.g a date selection, these dates are not printed on the actual report. When a second person views the report, he/she has no clue as to what the data consists of, they are unaware of the selection criteria.
The only solution is to export this to excel, or run Chrystal reports. But this should be entered into the standard report !!
Hopefully, you can help me out.
Kind regards,
Bas Stortenbeek
b1 Consulting
[email protected]
0043-664 833 8913Hi
If you see the screen shot I attached, it has the text "(new)" against the Folder name...
All new gl reports are under such a folder to differentiate... You cant deactivate any reports from the Standard Menu... You can just control it by authrization....
You can also ask your BASIS guy to display only the authorized trans on the user screen so that they are not able to see the std set of transactions
Br, Ajay M
Maybe you are looking for
-
Itunes will no longer open on my computer
I tunes will no longer open on my computer. I unloaded ITUNES and then LOADED it again and it still still will not open on my compuer....I click the ITUnes Icon...looks like it wants to load, then I get a window that says, do you want to allow this
-
Photos will not open in editor
I recently rebuilt my machine with new hard drives. I copied the photos folder to on offline disk, then copied back after I had set up the new system. open iphot and all looks good, until I select a photo to edit. I get a large exclamation mark, but
-
How do I stop sections of screen losing or not displaying image
I am intermittently experiencing sections of screen disappearing and not displaying the image this is not all the time as screen seems to flash eg when selecting messages to delete in my email a column section does not display this happened after I h
-
I wish to write a text file that is tab separated for viewing in UNIX, however the tab character provided in Labview is read as a ^M in the UNIX file and in notepad. If you have any suggestions, they would be appreciate
-
Hello all I am facing a Problem in My report.Problem is That When i run report its cells and Columns are Properly adjusted but when i Generate to PDF the spaces between labels is increased what should i do? Regards Adeel Aslam