Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select Dynamical fields and add into one field

Hi All,

I have problem to select fields in table COSR dynamically based on select-option field S_POSTD (if i enter period 2 to 4 i have to select SME002--SME004 Fields)

In below select-option (S_POSTPD) is entered onto the selection COSR table there are 16 fields SME001,SME002...SME016. based on the period entered onto the selection screen we have pick up these fields from table COSR...suppose period entered onto the selection screen is from 2 to 4...then we have to pick SME002,SME003 and SME004. and sum up all four of these to get E1.

below is the logic wht i want:

. Logic for getting E1 :- From table COSR get values from fields SME001 to SME016, where if

Period 1 then SME001, if 2 then SME002…..For entries with statistical key figure STAGR = CAPMW, WRTTP = ‘4’ and OBJNR.

OBJNR - beginning with KS would be cost centers, next four characters are 2000 (Controlling area), followed by 10 digit cost center which is 221212.Do Summation of all SME001, SME002……etc derived.

Onto selection screen we have select-options for below field

Field name Field description Type Single/ Range/

Check box / Radio button Mandatory (Y/N) Default Value Validations

S_POSTPD Posting period from and To Numeric Range Y None

can you please help me to develop logic for this .




Helpful Answer

Not what you were looking for? View more on this topic or Ask a question