Quantcast
Channel: SCN: Message List
Viewing all 8453 articles
Browse latest View live

Re: Goods recieved or not for a particular PO

$
0
0

Hi Sanjeev,

 

In my reruirement, they already developed a report for goods status i.e. whether goods recieved , intransit or cancelled etc...

 

But what actually happening is, for a particular PO having the status GR, but in the output we are getting the status as cancelled. because in the select query for VBFA, they had used vbtyp_n in ('i','R'). in where condition....Below is the program.. Please suggest me how to proceed.

 


tables: ekko,   "Purchasing Document Header
ekpo
,   "Purchasing Document Item
ekbe
,   "History per Purchasing Document
eket
,   "Scheduling Agreement Schedule Lines
likp
,   "SD Document: Delivery Header Data
vbfa
.   "Sales Document Flow.

selection-screen begin of block a1 with frame
title text-001.
parameter: p_po like ekko-ebeln.
select-options: s_erdat2 for ekko-bedat.
parameter: p_werks like ekpo-werks.
selection-screen end of block a1.

data: begin of i_ekko_combo occurs 0,
ebeln
like ekko-ebeln,
bsart
like ekko-bsart,
bedat
like ekko-bedat,
reswk
like ekko-reswk,
ebelp
like ekpo-ebelp,
loekz
like ekpo-loekz,
matnr
like ekpo-matnr,
werks
like ekpo-werks,
menge
like ekpo-menge,
elikz
like ekpo-elikz,
zbsgru
TYPE bsgru,                                 "MRDK902666
end of i_ekko_combo.

data: begin of i_eket occurs 0,
ebeln
like eket-ebeln,
ebelp
like eket-ebelp,
wemng
like eket-wemng,
end of i_eket.

data: begin of i_ekbe occurs 0,
ebeln
like ekbe-ebeln,
ebelp
like ekbe-ebelp,
belnr
like ekbe-belnr,
end of i_ekbe.

data: begin of i_likp occurs 0,
vbeln
like likp-vbeln,
wadat_ist
like likp-wadat_ist,
end of i_likp.

data: begin of i_vbfa occurs 0,
vbelv
like vbfa-vbelv,
vbeln
like vbfa-vbeln,
vbtyp_n
like vbfa-vbtyp_n,
rfmng
like vbfa-rfmng,
end of i_vbfa.

data: begin of i_art occurs 0,
matnr
like mara-matnr,
upc
like mean-ean11,
maktx
like makt-maktx,
idnlf
like eina-idnlf,
category
(3),
class(5),
lifnr
like eina-lifnr,
name1
like lfa1-name1,
mtart
like mara-mtart,
mstae
like mara-mstae,
mmsta
like marc-mmsta,
zzfc03
like mara-zzfc03,
kbetr
like konp-kbetr,            " Current Price
gmargin
(9),                       " Gross Margin
fretail
like konp-kbetr,          " Future Retail
fdate
like sy-datum,
pretail
like konp-kbetr,          " Prior Retail
pdate
like sy-datum,
labst
like mard-labst,
zzmenge
like mard-zzmenge,
pmax_alloc
like mard-zzopenstoqty,
in_transit
like marc-trame,
committed
like mard-zzopenrtvqty,
end of i_art.

data: begin of i_ekpo_art occurs 0,
matnr
like mara-matnr,
upc
like mean-ean11,
maktx
like makt-maktx,
idnlf
like eina-idnlf,
end of i_ekpo_art.

databegin of itab_report occurs 0,
upc
(14),
matnr         
like ekpo-matnr,
idnlf
(25),
maktx         
like makt-maktx,
menge         
like ekpo-menge,
rfmng         
like vbfa-rfmng,
po_delivery   
like ekbe-belnr,
status
(10)      type c,
end of itab_report.

dataline_cntr      type i,
total_days
(6type n,
order_type
(11) type c,
vendor_po
(11type c value 'Vendor P.O.',
delivery
(8)    type c value 'Delivery',
order_date 
like sy-datum,
order_date2
like sy-datum,
edit_werks 
like wosa-kunnr,
po_delivery
like ekbe-belnr,
quantity
(6)   type n,
qty_shipped
(6) type n value 0,
qty_shipped_out
(6) type n value 0,
status
(10)     type c,
received_qty
like ekpo-menge,
received_flag
type c value 'N',
set_matnr
like ekpo-matnr.
data: ws_cnt type i.

top-of-page.
include: zsrd_header.
include: zsrs_header.
uline.
skip.

if not s_erdat2[] is initial.
move s_erdat2-low to order_date.
move s_erdat2-high to order_date2.
write/01 'Order Date Range:',
19 order_date,
30 'to',
33 order_date2.
endif.

skip.
uline.
format color 1 intensified on.
write: /01 'UPC',
16 'Article',
26 'Style',
53 'Description',
86 'Quantity',
96 'Quantity',
107 'P.O/Delivery#',
121 'Status'.
write: /86 'Ordered',
96 'Shipped' ,
126 ' '.
uline.
format color off.

at selection-screen.
if p_po is initial.
if s_erdat2 is initial.
message e043 with 'Please enter a PO number or Date range'.
endif.
if s_erdat2-low = '00000000'.
message e005.
endif.
total_days
= 0.
total_days
= s_erdat2-high - s_erdat2-low.
if total_days > 60.
message e043 with
'Search limit is 60 Days, please reduce date range'.
endif.
endif.

start-of-selection.
perform po_type_select.
perform po_type.
perform get_article_data.
perform po_or_delivery_number.
perform write_report.

end-of-selection.

move 65 to sy-linno.

*&--------------------------------------------------------------------*
*&      Form  po_type_select
*&--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
form po_type_select.
* ZCTN is a CDC PO

if not p_po is initial.
select a~ebeln a~bsart a~bedat a~reswk b~ebelp b~loekz b~matnr
b
~werks b~menge b~elikz
from ( ekko as a inner join ekpo as b
on a~ebeln = b~ebeln )
into table i_ekko_combo
where a~ebeln = p_po
and b~werks = p_werks.
if sy-subrc <> 0.
message e043 with 'Invalid PO Number'.
endif.
endif.

if not s_erdat2[] is initial.
select a~ebeln a~bsart a~bedat a~reswk b~ebelp b~loekz b~matnr
b
~werks b~menge b~elikz
a
~zbsgru                                          "MRDK902666
from ( ekko as a inner join ekpo as b
on a~ebeln = b~ebeln )
into table i_ekko_combo
*          where a~bsart = 'ZCTN'                           "MRDK902666
where a~bsart IN ('ZCTN', 'ZUBI')                 "MRDK902666
and a~bedat in s_erdat2
and b~werks = p_werks.
DELETE i_ekko_combo WHERE bsart = 'ZUBI' AND  zbsgru <> 'RSS'. "MRDK902666
*    if sy-subrc <> 0.                                      "MRDK902666
if i_ekko_combo[] IS INITIAL.                           "MRDK902666
message e043 with 'No Data Found for Date range'.
endif.
endif.
endform.                    "po_type_select

*----------------------------------------------------------------------*
* FORM get_article_data.
*----------------------------------------------------------------------*
form get_article_data.
sort i_ekko_combo by matnr.
loop at i_ekko_combo.
if set_matnr <> i_ekko_combo-matnr.
set_matnr
= i_ekko_combo-matnr.
else.
continue.
endif.
refresh i_art.
call function 'Z_ORS_ARTICLE_DATA_BUILD'
EXPORTING
SITE                
= i_ekko_combo-werks
ARTICLE             
= i_ekko_combo-matnr
TABLES
ARTICLE_DATA        
= i_art
EXCEPTIONS
ARTICLE_UPC_INVALID 
= 1
ARTICLE_INVALID     
= 2
UPC_INVALID         
= 3
ARTICLE_SITE_INVALID
= 4.
if sy-subrc = 0.
i_ekpo_art
-matnr = i_ekko_combo-matnr.
i_ekpo_art
-upc = i_art-upc.
i_ekpo_art
-maktx = i_art-maktx.
i_ekpo_art
-idnlf = i_art-idnlf.
append i_ekpo_art.
endif.
endloop.
sort i_ekpo_art by matnr.
endform.                                "get_article_data.
*----------------------------------------------------------------------*
* FORM po_type.
*----------------------------------------------------------------------*
form po_type.

check not i_ekko_combo[] is initial.

sort i_ekko_combo by ebeln ebelp matnr.

select ebeln ebelp wemng
from eket
into table i_eket
for all entries in i_ekko_combo
where ebeln = i_ekko_combo-ebeln
and ebelp = i_ekko_combo-ebelp.

select ebeln ebelp belnr
from ekbe
into table i_ekbe
for all entries in i_ekko_combo
where ebeln = i_ekko_combo-ebeln
and ebelp = i_ekko_combo-ebelp.

describe table i_ekbe lines line_cntr.
if line_cntr > 0.
sort i_ekbe by ebeln ebelp belnr.

select vbeln wadat_ist
from likp
into table i_likp
for all entries in i_ekbe
where vbeln = i_ekbe-belnr.

select vbelv vbeln vbtyp_n rfmng
from vbfa
into table i_vbfa
for all entries in i_ekbe
where vbelv = i_ekbe-belnr
and vbtyp_n in ('i','R').

sort i_likp by vbeln wadat_ist.
sort i_vbfa by vbelv vbeln vbtyp_n.
endif.
endform.                                "po_type.
*----------------------------------------------------------------------*
* FORM po_or_delivery_number.
*----------------------------------------------------------------------*
form po_or_delivery_number.
order_type
= ' '.
status
= ' '.
received_qty
= 0.
sort i_ekko_combo by ebeln ebelp matnr.
loop at i_ekko_combo.
received_flag
= 'N'.
qty_shipped
= 0.

read table i_ekbe with key ebeln = i_ekko_combo-ebeln
ebelp
= i_ekko_combo-ebelp
binary search.
if sy-subrc <> 0.
status
= 'IN PROCESS'.
po_delivery
= i_ekko_combo-ebeln.
order_type
= space.
if i_ekko_combo-loekz = 'L'.
status
= 'DELETED'.
endif.
else.
po_delivery
= i_ekbe-belnr.
order_type
= delivery.
read table i_likp with key vbeln = i_ekbe-belnr
binary search.
if sy-subrc = 0.
if not i_likp-wadat_ist = '00000000'.
read table i_vbfa with key vbelv = i_ekbe-belnr
vbtyp_n
= 'R'
binary search.
if sy-subrc = 0.
status
= 'INTRANSIT'.
qty_shipped
= i_vbfa-rfmng.
endif.
status
= 'INTRANSIT'.
read table i_vbfa with key vbelv = i_ekbe-belnr
vbtyp_n
= 'i'
binary search.
if sy-subrc = 0.
status
= 'RECEIVED'.
received_flag
= 'Y'.
qty_shipped
= i_vbfa-rfmng.
endif.
else.
status
= 'OPEN'.
endif.
endif.
endif.
if received_flag = 'N'.
if order_type = delivery.
if i_ekko_combo-elikz = 'X'.
status
= 'CANCELLED'.
endif.
else.
if i_ekko_combo-elikz = 'X'.
read table i_vbfa with key vbelv = i_ekko_combo-ebeln
binary search.
if sy-subrc = 0.
if i_vbfa-vbtyp_n = 'i'.
status
= 'CANCELLED'.
endif.
endif.
endif.
endif.
endif.
perform create_report.
endloop.
endform.                                "po_or_delivery_number.
*----------------------------------------------------------------------*
* FORM create_report.
*----------------------------------------------------------------------*
form create_report.
itab_report
-po_delivery = po_delivery.
itab_report
-matnr       = i_ekko_combo-matnr.
itab_report
-menge       = i_ekko_combo-menge.
itab_report
-status      = status.
itab_report
-rfmng       = qty_shipped.

*---> Article Data
read table i_ekpo_art with key matnr = i_ekko_combo-matnr
binary search.
if sy-subrc = 0.
shift i_ekpo_art-upc left deleting leading '0' IN CHARACTER MODE ."smart: 2010-04-07 #115
itab_report
-upc         = i_ekpo_art-upc.
shift itab_report-upc right deleting trailing space IN CHARACTER  "smart: 2010-04-07 #115
MODE .                                                          "smart: 2010-04-07 #115
overlay  itab_report-upc with '00000000000000'.
itab_report
-idnlf = i_ekpo_art-idnlf(25).
itab_report
-maktx = i_ekpo_art-maktx.
endif.
append itab_report.

endform.                                "create_report.
*----------------------------------------------------------------------*
* FORM write_report.
*----------------------------------------------------------------------*
form write_report.
sort itab_report by po_delivery matnr.
loop at itab_report.
move itab_report-menge to quantity.
move itab_report-rfmng to qty_shipped_out.
write: /01 itab_report-upc.

clear ws_cnt.
select count(*) into ws_cnt from mean
where matnr = itab_report-matnr.
if ws_cnt > 1.
write 15(1) '*'.
endif.

write16 itab_report-matnr,
26 itab_report-idnlf,
53 itab_report-maktx(32),
85 quantity no-zero,
95 qty_shipped_out no-zero,
107 itab_report-po_delivery,
121 itab_report-status.

endloop.
endform.                                "write_report.

end-of-page.
write:
'* = Multiple UPCs exist for this article, primary UPC is displayed.'.


Re: University Challenge

$
0
0

Hi,

 

Wow you've asked all our touchpoints - SCN, Lumira.com, support.lumira@sap.com !!

 

As i've responded on other comms' lines, I have asked internally that the website http://saplumira.com/lumira-university.php be clarified. 

 

The only clue I can see is the mention of "TechEd Bangalore" which ended December 11–13, 2013.

 

So perhaps  this incentive has rolled over as we look towards end 2014? i don't know.

 

Please wait to find out, you will be contacted soon.

 

Regards

H

Re: Conversion_error in IDOC

$
0
0

Hi Ankita,

please provide the sample code you have used in IDOC_OUTPUT_SHPMNT.

Means what parameters you are passing, please show it once.

Re: Adopt Purchase Requisition in ME51N

$
0
0

you can check it in SE38. enter program LMEGUICJM and click display, then search for 999402

if you get a hit, then the note is implemented.

 

Another suggestion would be to check if you are using the BAdI  ME_PROCESS_REQ_CUST. If there is something wrong in the coding, then it could eventually be a root cause.

611175 - ME_PROCESS_REQ_CUST: Documentation

 

Since when did you encounter this behavior? what happened before? release change? new developments? implementing OSS notes? Does it work for other users?

Re: Co02 ( Batch fixed reservations )

$
0
0

Hello

 

Try with BAdI WORKORDER_UPDATE.

Please also consider that, sometimes the exit/BAdI is called in update mode and it does not stop on your break-points, unless you activate update debugging.

 

BR

 

Caetano

Re: Tomcat 7 Load Balancing using F5 in BI4.1

$
0
0

HI Nikhil,

 

there are two ways to configur F5 on top of tomcats with SSL.

 

1) Enable SSL on the F5:

Nothing to do on the BO Tomcat service side, All reqeusts will go through the Loadbalancer SSL.

This needs to be done by the network team

 

2) Enable SSL on the Tomcat Side:

you need to enable SSL on the individual tomcat side and 8443/443 ports needs to be configured in server.xml. same ports needs to be used to configure LB on top of Tomcat.

1185443 - How to configure Tomcat to use Secure Sockets Layer (SSL)

 

hope this answers your question.

Re: DB2 Redirect Restore post step

$
0
0

Hi Deepak,

 

 

we are in AIX platform.

 

 

 

Thanks!

Re: Solman 7.1 and logical component for NW 7.4 PI


Re: I am getting below error in rich client while using Bex query as a source.I am not able to fetch the query. Please submit any solution you have

$
0
0

Hi Mahantesh,

 

please refresh the BEx query then run the Bex query

have you created the variable in BEx query level?

please check the authorization for query.

 

Thanks,

Phani.

Re: RPTCURRENCY issue in SAP BPC 10.0 SP15 Currency conversion

Re: Change Authorized user to _SYS_REPO for a OLAP view

$
0
0

Hi Krishna.

 

I have created an Analytic view.

 

I went to Security ---> _SYS_REPO ---> but how do I add the View in _SYS_REPO ?

 

Regards,

Andila

Re: SAP Portal sniffing using HttpWatch

$
0
0

Hi Sean,

HttpWatch will be useless for that purpose. Why? Because it shows local HTTP traffic from your web browser perspective. MSS data fetch takes place between your backend and system where MSS application runs.

Having said that best option would be to set up a trace on the backend system to see how certain fields are retrieved.

 

In case of OADP fields retrieval (MSS WDA) search for implementations of IF_HRTMC_DR_FIELDS interface.

Re: Queue in SMQ2

$
0
0

Hi Apu,

 

Did you followed the document and maintained the mentioned settings in it?

 

Regards,

Reema

Re: Commission Agent Commission

$
0
0

Dear Guru,

 

Rebate in standard only goes to payer, but i am case it booked the provision against commission agent, how can i configure this...

 

i have done the similar case in one of my case but there provision is suppose to booked against sold to party, so i remove the payer field from condition table and assign there sold to party, so system booked the provision against sold to party not against payer...

 

but i above case i create commission agent as a customer and in condition table maintenance no such characteristic is visible so that i can create the required condition table.

 

please suggest.

 

Looking for the gurus response.

Re: Line at the end of repeat subform

$
0
0

Hello Gowthami,

 

Please remove the border for the row of the items table.And place the border(down) to the subform.


Re: Z-table row valdiations

$
0
0

Hi DPM,

Mine is TMG situation.

I'm in need of a sample code, and the event where I put this.

 

Jogeswara Rao K

Re: Release strategy configuration creation date

$
0
0

Check without giving any selection date...

May in the duration (which you have entered), no changes or created or deleted for release strategy....

Re: ContextConfigurationException - Web Dynpro Java

$
0
0

Hi Jun, no, the modal was already initialized (in a source component). I just make a reference to it.

Re: Adding search attributes for BP duplicate check on TREX

$
0
0

Hi Chi Ho Li, Mukesh,

 

Is it possible to add new attributes to the BP duplicate check on TREX ?

For example, I want to add the e-mail field.

 

I would appreciate an answer because it is very Urgent.

 

thank you very much

 

Best regards,

Frederic

Re: No entry in V_T706F - Travel Management

$
0
0

Hi Reynolds

 

I've tried the same as you mentioned but still it's the same case. I'm getting the same error. I want to understand one thing.. If I want to go with Cumulation's with period parameter as monthly, then how i must enter the dates in the system. do I need to create months every time for each calendar year??

like 01.01.2014,01.02.2014??? tell me what is the exact use of this..

 

Is there any other way to sort the Issue??

 

Await for ur valuable Inputs

 

Cheers

Pradyp

Viewing all 8453 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>