Application Development 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: 

SAPSCRIPT: How does MB1B call form WASCHEIN ??

former_member425121
Participant
0 Kudos

Hi

I'm new in SAPSCRIPT, so i was reading some documentation about this.

Now i need to do some development, in MB1B (SAPMM07M) when we make a movement and press Save, the transaction generates a Document Number and generates a spool, with movement information. I need to make some modifications to that spool form, so the first things i investigated is this form is WASCHEIN and it is generated in SAPM07DR program, in ENTRY_WA03 routine. (Actually i didn't found that information myself, but the functional personnel told me that; I really dont' know how to find the code wich fill the Sapscript form).

I suppose i need to make a copy of WASCHEIN form and make in this new form the modifications.

But, how can i change that SAPM07DR uses the new form instead the standard WASCHEIN form ??

I was looking in SAPMM07M and i did not found where it calls to SAPM07DR, and i was looking in SAPM07DR and i did not found where it 'calls' the WASCHEIN form; i could not even make the debugg stop in SAPM07DR (not with normal debugg and nor with 'Update debugg'). I see in SAPM07DR the OPEN_FORM call, but even setting breakpoints in this lines, the debugg does not pass by it.

So, how can i make the changes to fill the new fields in the new form (based in WASCHEIN) ??? do i nedd to make a copy of SAPM07DR ?? but where does it calls to WASCHEIN form so i can change this call ??

Please help !!

Thanks

Frank

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

HI Frank,

If I understand your problem correctly, The Transaction's underlying program picks the default output type. This output type has a Program attached to it. This program actually call the SAPSCRIPT Function modules.

To have your own layout, you do not need to copy SAPMM07M, but create a Z program. Attach it to a new output type. The Z Program should have the custom logic.

Thanks,

Ravi

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

HI Frank,

If I understand your problem correctly, The Transaction's underlying program picks the default output type. This output type has a Program attached to it. This program actually call the SAPSCRIPT Function modules.

To have your own layout, you do not need to copy SAPMM07M, but create a Z program. Attach it to a new output type. The Z Program should have the custom logic.

Thanks,

Ravi

0 Kudos

Thanks Ravi

What program is attached to Output type, SAPMM07M (MB1B) or SAPM07DR (print prgram) ??

In MB1B we are making movents with 541 movement type, but why could i not make the debugger pass by SAPM07DR, wich suppose it's the program wich calls the WASCHEIN Form ??

And where can i attach the program to the output type ? because i will use the same movement type (541) but i need to generate other sapscript form.

And what program do i must to do Z, SAPMM07M or SAPM07DR ?? , I suppose the print program (SAPM07DR), but however and don't find where it call the WASCHEIN form and code wich fills the form; so i can not agregate my code for fill the new form fields.

Any ideas ??

(Sorry for many questions)

Thanks

Frank

0 Kudos

When output is triggered, it is either immediately processed or later. If it is immediately processed, then it is done in an update task and you will not be able to debug it, unless you are doing update debugging. Easier will be to change the processing to 'later'. Then you can use RSNAST00 program to process your output. This time you can stop at your break-point.

Go to transaction NACE. Choose application ME. You will find all the details of programs, forms etc here. This is where you will attach your program, form if needed.

Srinivas

0 Kudos

Hi Srinivas

Thanks, that transaction NACE is the key for make the sapscript form.

But, how can i set the processing mode ?

I was trying set breakpoints at MB1B and at SAPM07DR entry_wa03 rotuine, then i execute MB1B, it stops at breakpoint, i select 'Update Debugging', and i make the save action; but even so the debugger pass by SAPM07DR.

That because i need to find the code wich fills the WASCHEIN form, for agregate there my new code.

Thanks a lot !!

Frank