Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding select-options

Former Member
0 Likes
322

hii,

TABLES: VBAP, VBEP

SELECT ALL VBAP-ERDAT

WHERE VBEP-LIFSP = u2018GRu2019

IF VBAP-ERDAT < SY-DATE u2013 3 (business days, per the factory calendar)

THEN VBEP-LIFSP = u2018 u2018

END

this is the logic to make query.

NOW my question is........

Field Select-option / Parameter Default

VBAK-AUART

VBAP-ERDAT SO 60days from today to Today u2013 3 working days

Current Delivery Block SO u2018GRu2019

New Delivery Block P Blank

Logic:

1. Select all VBEP lines that meet the selection criteria.

2. Update order lines by calling u2018BAPI_SALESDOCUMENT_CHANGEu2019

how we make code for

VBAP-ERDAT SO 60days from today to Today u2013 3 working days

THANKS

RAHUL

1 REPLY 1
Read only

valter_oliveira
Active Contributor
0 Likes
292

Hello.

You can use:


DATA: day1 TYPE dats,
      day2 TYPE dats.
day1 = sy-datum - 60.
day2 = sy-datum - 3.
SELECT * FROM vbap WHERE erdat BETWEEN day1 AND day2.

However, for working days, you have to change this code and use FM FKK_ADD_WORKINGDAY (or another FM that will make you change variable day2).

Regards.

Valter Oliveira.

Edited by: Valter Oliveira on Jul 2, 2008 4:20 PM