2006 Feb 14 8:25 PM
HI All,
I have a question, I have 8 different dates field in upload file. we are using our own customize FM , which read the date from file and re-arrange it according to user profile setup in SU01.
My question is that what is the smartest way to pass these 8 fields all together and get 8 fields according to the user profile.
I dont want to take 8 different variables and use this Fm 8 times for each date in upload file.
Remember as per 1 recorded file I can have dates up to 8 fields as I have 8 different fields in column which I want to upload .
If Ill use
<b>perform convert_date_to_user_profle using Variable1 ( Coolum Date)
Variable2 ( Column Date)
Variable3 ( Column Date)
Variable4 ( Column Date)
Variable5 ( Column Date)
Variable6 ( Column Date)
Variable7 ( Column Date)
Variable8 ( Column Date)
changing All variables gain ...</b>
<b>You can send only for date input in one time and get the result...</b>
Pl gives your input/suggestions.
Thanks
HI All,
I have a question, I have 8 different dates field in upload file. we are using our own customize FM , which read the date from file and re-arrange it according to user profile setup in SU01.
My question is that what is the smartest way to pass these 8 fields all together and get 8 fields according to the user profile.
I dont want to take 8 different variables and use this Fm 8 times for each date in upload file.
Remember as per 1 recorded file I can have dates up to 8 fields as I have 8 different fields in column which I want to upload .
If Ill use
<b>perform convert_date_to_user_profle using Variable1 ( Coolum Date)
Variable2 ( Column Date)
Variable3 ( Column Date)
Variable4 ( Column Date)
Variable5 ( Column Date)
Variable6 ( Column Date)
Variable7 ( Column Date)
Variable8 ( Column Date)
changing All variables gain ...</b>
<b>You can send only for date input in one time and get the result...</b>
Pl gives your input/suggestions.
Thanks
2006 Feb 14 8:29 PM
2006 Feb 14 8:32 PM
Here is what I mean about passing the entire row.
report zrich_0003.
data: begin of itab occurs 0,
field1(10) type c,
field2(10) type c,
field3(10) type c,
end of itab.
loop at itab.
perform convert_date_to_user_profile changing itab.
endloop.
*&---------------------------------------------------------------------*
*& Form convert_date_to_user_profile
*&---------------------------------------------------------------------*
form convert_date_to_user_profile changing wa like itab.
* convert field 1
write:/ wa-field1.
* convert field 2
write:/ wa-field2.
* convert field 3
write:/ wa-field3.
endform.
Regards,
Rich Heilman
2006 Feb 14 8:41 PM
I have to pass each variable every time to FM and get the result and pass back ..I am looking for a shortcut, I dont want to code it again and again .. I think this the only way I can do it . I have to code like this pass these variables to Fm one by one and get date one by one and pass to BDC program.
Thanks Rich..
2006 Feb 14 8:44 PM
2006 Feb 14 8:47 PM
Definitely Rich . It makes sense to me . I am just looking any other option in which I dont have to declare an itab or so many variables. Looks like this the only option so far ..
Thanks for your prompt reply !!!
2006 Feb 14 9:39 PM
report zrich_0003.
TYPES: BEGIN OF ITAB,
FIELD1(10) TYPE C,
FIELD2(10) TYPE C,
FIELD3(10) TYPE C,
END OF ITAB.
DATA: MY_TAB TYPE STANDARD TABLE OF ITAB WITH HEADER LINE.
PERFORM CONVERT_DATE_TO_USER_PROFILE TABLES MY_TAB.
*&---------------------------------------------------------------------*
*& Form convert_date_to_user_profile
*&---------------------------------------------------------------------*
FORM CONVERT_DATE_TO_USER_PROFILE TABLES MY_TAB STRUCTURE MY_TAB.
* convert field 1
WRITE:/ MY_TAB-FIELD1.
* convert field 2
WRITE:/ MY_TAB-FIELD2.
* convert field 3
WRITE:/ MY_TAB-FIELD3.
ENDFORM. "convert_date_to_user_profile
Sorry for steal your code Rich -:P But i think that this is a better way to do it -;)
Greetings,
Blag.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |